Skip to content

Instantly share code, notes, and snippets.

@DavyLin
Created December 31, 2013 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavyLin/8197875 to your computer and use it in GitHub Desktop.
Save DavyLin/8197875 to your computer and use it in GitHub Desktop.
a example for javascript
var a = 'hello';
var b = new String('hello');
a + b; // 'hello hello'
typeof a; // 'string'
typeof b; // 'object'
a instanceof String; //false
b instanceof String; // true
a.substr == b.substr; //true
a == b; //true;
a === b; //false
// v8
Object.prototype.toString.call([]) == '[object Array]'; // true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment