MCPcopy Create free account
hub / github.com/appacademy/Module-1-Resources / testingLet

Function testingLet

w2/d4/scope.js:194–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192*/
193
194function testingLet() {
195 // * hoisting let
196 // ! error
197 // console.log(test);// ReferenceError: test is not defined
198 let test = 1;
199
200 // * let can be reassigned
201 test = 2;
202 console.log(test); // 2
203
204 // * let cannot be re declared
205 // let test = 3; // ERROR
206
207 // ! let is block scope
208 // ! we cannot access inner block from outer
209 if (true) {
210 let access = false;
211 }
212
213 // * let is block scopes
214 // console.log(access);// ReferenceError: access is not defined
215}
216
217testingLet();
218

Callers 1

scope.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected