js中该变量如何使用

如题所述

???你在说什么???

什么叫变量怎么使用?定义之后使用还能怎么用
var temp = '变量这么用'
console.log(temp) //控制台输出“变量这么用”
methodFun(temp)
function methodFun(str){
console.log(str) //输出"变量这么用"

}
知道不?
温馨提示:答案为网友推荐,仅供参考
相似回答