Jul 8, 2024
Basics Recap: Var, Let, Const
var, let, and const.var is part of the older JavaScript version (ES5), while let and const are part of the newer version (ES6).var has function scope, let and const have block scope.let and const prevent issues with variable hoisting and re-declaration.Variable Scope and Window Object
window object and its importance in JavaScript.var variables attach to the window object, whereas let and const do not.window object, including console, localStorage, etc.Execution Context
Iterating Over Arrays and Objects
for-of and for-in loops to iterate over array elements and object properties.Copying Variables and Arrays using Spread Operator
... spread operator can make shallow copies of arrays and objects.Truthy and Falsy Values
0, null, undefined, NaN, false, '' (empty string).Callbacks and Handling Asynchronous Code
setTimeout with a callback function.