虽然知道js的类型明确指定,可是在使用中变换类型,竟然也是能够的,例如spa
<script>ip
var a, b, c;string
a = 10;it
b = "astring";io
c = [5, 2, 4, 6];ast
a = a + 5;function
alert(a);//15变量
b = b.concat("additional words", "ending");map
alert(b);//"astringadditional wordsendingword
c = c.map(function(e){return e*2;});//10,4,8,12
alert(c);
a = b;
alert(a);//"astringadditional wordsending
b = c.length;
alert(b);//4
c = c.join("/");
alert(c);//10/4/8/12
</script>
但我以为,知道有这个功能就能够了,为了节省个变量名,这么变来变去,玩死本身,得不偿失。