Skip to content

Instantly share code, notes, and snippets.

@fuchao2012
Created May 21, 2015 07:12
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 fuchao2012/a6808729ee34e9c3224c to your computer and use it in GitHub Desktop.
Save fuchao2012/a6808729ee34e9c3224c to your computer and use it in GitHub Desktop.
var a=10;
a.fuchao=10;
console.log(a.fuchao+a);
var s='fuchao';
var s.fuchao='fuchao';
console.log(s.fuchao+s);
//result?
//you can not add new attr to basic types like number or string what's more, undefine+string is string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment