(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