Skip to content

References: Variables, Data Types & Scope Fundamentals

  1. Variable (computer science) - Wikipedia - Formal definition of memory allocation, symbolic naming, assignment semantics, and variable binding across modern computing languages. Foundational for understanding state retention across draw cycles in animations.

  2. Scope (computer science) - Wikipedia - Comprehensive exploration of lexical scoping, identifier resolution, block boundaries, and lifetime duration. Crucial for distinguishing between global sketch state and local loop iterators in programs.

  3. Data type - Wikipedia - Theoretical and practical taxonomy of primitive types (integers, floating-point numbers, booleans, strings) and composite objects, clarifying dynamic typing behavior in JavaScript environments.

  4. Eloquent JavaScript (Third Edition) - Marijn Haverbeke - No Starch Press - Haverbeke is celebrated for his vivid 'tentacles, not boxes' mental model of variable bindings, demystifying memory references and lexical environment chains for modern JavaScript programmers and learners.

  5. You Don't Know JS Yet: Scope & Closures (Second Edition) - Kyle Simpson - Self-Published / O'Reilly Media - Simpson pioneered the rigorous 'lexical scope marble bucket' metaphor, providing the definitive explanation of variable shadowing, block scope (let/const), and hoisting rules in modern ECMAScript.

  6. JavaScript Data Types and Data Structures - MDN Web Docs - Authoritative documentation of JavaScript primitive types, type coercion rules, BigInt, Symbol, and structural object types in contemporary ECMAScript standard environments and engines.

  7. Grammar and Types: Declarations with let, const, and var - MDN Web Docs - Practical guide covering variable declaration semantics, temporal dead zones, block scoping, and immutability constraints in modern web development and interactive canvas scripts.

  8. JavaScript Variables and Types Tutorial - JavaScript.info - Detailed visual tutorial explaining memory storage, naming conventions, constants, and execution context boundaries with interactive code checks for beginners and intermediate coders.

  9. Variables in p5.js: State and Animation - The Coding Train - Engaging visual lesson demonstrating how incrementing global variable values across successive draw() loops creates continuous animation and interactive state changes over time in sketches.

  10. p5.js Environment Constants Reference - p5.js Foundation - Reference guide detailing built-in system variables such as width, height, frameCount, mouseX, and mouseY that maintain real-time sketch state and input coordinates on canvas.