js里定义的数组a{1,.,2,+,1,.,2,} 怎样计算里面的1.2+1.2呢
var a=new Array(1,".",2,"+",1,".",2); alert(eval(a.join("")));
1L 正解 测试过了
var a=new Array(1,".",2,"+",1,".",2);console.log(a.join('').split('+'))
都是正解啊