请问最下面的param为什么是undefind

请问最下面的 console.log(param)为什么是undefind
回答
你的flag是一个字符串,没有fromType属性,if(flag.fromType == 'buy') 不会执行。parma未被定义。
变量提升,外加压根没进到 if 分支里。

你 flag 值是 buy,flag.fromType 值还能是 buy 吗?
以上是 请问最下面的param为什么是undefind 的全部内容, 来源链接: utcz.com/a/107255.html


