NS-002
observedshadowed-identifier
A var assignment silently overwrites a hoisted function of the same name
- reads as
- A canvas is blank and unanimated. Conclusion drawn: a rendering or design problem.
- actually
- The file already used `var start` as a timestamp. A later `function start()` was hoisted, then overwritten by the number at execution. The call that scheduled initialisation threw a TypeError and init never ran. The element sat at its untouched default size with zero painted pixels.
- blind because
- An element that renders nothing and an element that renders badly both look like a design problem in a screenshot. Nothing distinguishes them visually.
- the check
- Read the element's backing store, not its appearance: canvas.width/height still at the 300x150 default means resize() never ran.
- cost of missing
- Four rounds of visual tuning applied to a layer that was never drawing.
- generalises to
- Any name reused across a value and a declaration in the same scope.