📌  相关文章
📜  在javascript代码示例中以数字方式添加变量

📅  最后修改于: 2022-03-11 15:02:47.598000             🧑  作者: Mango

代码示例1
//use parseFloat(x); to change string to number
a=10;
b=20;
console.log(parseFloat(a)+parseFloat(b));//this will give a+b=30
//while
consle.log(a+b); //will give a+b=1020 [as String]