uncaught EvalError Identifier my_function cannot be declared with var in current evaluation scope consider trying let instead
This error occurs when you try to declare a function with the keyword "var" in the current evaluation scope. In JavaScript, functions can be declared using the "function" keyword or by assigning a function expression to a variable using "let" or "const".
To fix this error, you should declare the function using the "function" keyword or assign it to a variable using "let" or "const". For example:
// Using function keyword function myFunction() { // function body }
// Using let keyword let myFunction = function() { // function body }

原文地址: http://www.cveoy.top/t/topic/cyiE 著作权归作者所有。请勿转载和采集!