JavaScript/数字与字符串:修订间差异
来自康健生活
| 第11行: | 第11行: | ||
"1.7550645740976392" | "1.7550645740976392" | ||
</pre>}}}} | </pre>}}}} | ||
==== Nember + String ==== | |||
{{Leftrightflex|<syntaxhighlight lang="javascript"> | |||
'abc' + 'xyz'; | |||
10 + 5; | |||
'abc' + 10; | |||
'abc' + 10 + 5 + 'xyz'; | |||
10 + 5 + 'abc' + 'xyz'; | |||
</syntaxhighlight>|{{Consoleout|<pre> | |||
"abcxyz" | |||
15 | |||
"abc10" | |||
"abc105xyz" | |||
"15abcxyz" | |||
</pre>}}}} | |||
=== toString === | === toString === | ||
{{Leftrightflex|<syntaxhighlight lang="javascript"> | {{Leftrightflex|<syntaxhighlight lang="javascript"> | ||