2006-12-28

The way of checking the type of an object

关键字: javascript
Apress ProJavaScriptTechniques The first way of checking the type of an object is by using the obvious-sounding typeof operator. js 代码   // Check to see if our number is actually a string   if ( typeof& ...
2006-12-28

javascipt scope

关键字: javascript
From Apress ProJavaScriptTechniques In JavaScript, scope is kept within functions, but not within blocks (such as while, if, and for statements). js 代码   // Set a global variable, foo, equal to test   var foo =&nb ...