JavaScript Strict mode Function scoping in strict mode

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!


In Strict Mode, functions declared in a local block are inaccessible outside the block.

"use strict";
  f(); // 'hi'
  function f() {console.log('hi');}
f(); // ReferenceError: f is not defined

Scope-wise, function declarations in Strict Mode have the same kind of binding as let or const.

Got any JavaScript Question?