I haven't been learning JavaScript for a long time. I'll have 5 experiences as follows and will be updated slowly in the future.
1. Assigning values to undeclared variables in strict mode will cause a ReferenceError error to be thrown (meaning, all variables must be defined with var, and global variables cannot be defined inside the function);
2. In strict mode, variables named eval and arguments cannot be defined, otherwise syntax errors will be caused;
3. Determine whether a variable value is equal to undefined. This is to formally distinguish between empty object pointers and uninitialized variables;
4. As long as the variable intended to save the object has not really saved the object, the object should be explicitly allowed to save the null value. This not only reflects the convention of null as an object pointer, but also helps to further distinguish between null and undefined;
5. Octal literals are invalid in strict mode and will cause the supported Javascript engine to throw an error;
In fact, learning JavaScript requires learning more, practicing more, and practicing more. Practice makes perfect. The ancients did not deceive me! ~~