Skip to content

Instantly share code, notes, and snippets.

@yardfarmer
Created September 14, 2014 07:52
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 yardfarmer/ef09cc36daab258729f0 to your computer and use it in GitHub Desktop.
Save yardfarmer/ef09cc36daab258729f0 to your computer and use it in GitHub Desktop.
// '+' 运算符的结合性
当加号运算符和字符串和数字一起使用时,需要考虑加号的结合性的对运算顺序的影响。也就是说,运算结果是依赖于运算符的运算顺序的。
1+2+"3" => 33
"1"+2+"3" => "123"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment