Js-Bootcamp Livecode - February 5th 2020
✓ Published0🌍 Public
This example demonstrates JavaScript object and array mutability, scope, and hoisting concepts through live code examples. It uses native JavaScript objects, arrays, and console logging to illustrate dot and bracket notation for property access, alongside `Object.entries()` for iteration. The code shows global versus function scope with `var`, `let`, and `const`, and explains hoisting by logging a variable before its declaration. The accompanying `index.html` loads a `bundle.js` for execution.
AI-generated descriptionJs-Bootcamp Livecode - February 5th 2020
Demo over objecten.
- Zelf handmatig een object aanmaken.
- Aan de hand van een array mutability vs immutability uitleggen. Array is overschrijven, object is properties eruit halen. Je kan ook wat uitleggen over const gebruik in object. Dat je de var niet kan overschrijven maar properties in het object wel.
- Dot notation en bracket notation om dingen uit een object te halen.
Demo over scope
- Global scope versus function scope
- Je kan een voorbeeld laten zien van het ‘lekken’ van een var en waarom const en let in het leven zijn geroepen
Demo over Hoisting
MIT Licensed