MCPcopy
hub / github.com/sudheerj/javascript-interview-questions / accidental-global.js

File accidental-global.js

coding-exercise/accidental-global.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1function foo() {
2 let x = (y = 0); // ⚠️ y becomes a global variable
3 x++;
4 y++;

Callers

nothing calls this directly

Calls 1

fooFunction · 0.70

Tested by

no test coverage detected