Front-end primary problem

(function() {
   var a = b = 5;
})();
console.log(a);
console.log(b);

This question examines scope. This is an immediate execution function. The variable defined in es6 belongs to the variable in the scope, then a is invalid outside the scope and outputs undefined, and b is a global variable = 5. Before es5, it was unified to 5.

props and state in React difference

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325220421&siteId=291194637