I am interested to learn when using strict mode, where does it apply to. I know that I cannot put it once in my file and be done, rather it has to be in the functions, etc. I was told if I put it in an IIFE then I am good, but my questions becomes with this scenario:
module.exports = function () {
"use strict";
function foo(){return bar;}
function bar(){return foo;}
}
Do both foo()
and bar()
have this now enabled? Is there an easy way to check to ensure that the scope of strict is reaching them?