let my_function_str = function my_functiona b return a + b; ;evalmy_function_str 会报以下错误不是已经用let 声明了吗uncaught EvalError Identifier my_function cannot be declared with var in current evaluation scope c
这个错误提示是因为在使用eval函数时,代码中含有var关键字,而在当前的作用域中已经声明了该变量名。建议使用let关键字来代替var。
原文地址: https://www.cveoy.top/t/topic/cyjW 著作权归作者所有。请勿转载和采集!