I'm a new to node.js and javascript.I checked code examples of node.js and it used use strict
mode.
For example, a server.js:
'use strict';
//some server code
Also, I got to know that use strict
is present at head of every js file.
It confused me and so I want to know what is best practice in Nodejs to use strict mode?
Thank you all, My question is focus on the strict mode. In this mode, some code mistake can be reported. In back-end, the strict error reporter also run? And If I need use it, I should add it in every js file header? Or add it in main file(server.js or etc.) head? Or use some node.js self style?