JS Asterisk
JS Function Block
JS Return Statement
JS Invoke
JS Parentheses
JS Interpreter
JS Hoisting
JS self-invoking function expressions
JS anonymous functions
JS “lexical scope”
JS “global scope”
JS “primitive values”
JS “local scope”
JS store-value keywords
JS Closures
JS Prototype
JS Closures (b)
JS Primitive Data Types:
let str1 = 'Hello';
let str2 = "World";let num1 = 10;
let num2 = 3.14;let bigInt = 1234567890123456789012345n;let undef;let n = null;const sym1 = Symbol('description');JS Non-primitive Data Types
let person = {
name: 'John',
age: 30,
city: 'New York'
};let numbers = [1, 2, 3, 4, 5];
let mixedArray = [1, 'hello', true, null];JS “typeof”
console.log(typeof 'hello'); // Output: “string”console.log(typeof 123); // Output: “number”console.log(typeof true); // Output: “boolean”console.log(typeof undefined); // Output: “undefined”console.log(typeof null); // Output: “object” (historical quirk, should be “null”)console.log(typeof {}); // Output: “object”console.log(typeof []); // Output: “object”JS parseInt( )
parseInt('42')parseInt('42nd Street')JS parseFloat()
parseInt('3.14')parseInt('3.14th Street')