This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. FIRST-CLASS FUNCTIONS: Everything you can do with other types you can do with function. Like put them in array, set variables equal to them, etc. | |
2. AN EXPRESSION: A block of code that results in a value. | |
5. PRIMITIVE: A type of data that represents a single value. Means no object. | |
6. PASS BY VALUE VS PASS BY REFERENCE: primitive values work as pass by value but objects work as pass by reference. | |
7. IMMEDIATLY INVOKED FUNCTION EXPRESSIONS (IIFE): function which is immediatly invoked without affecting any other scope of variables and methods. Syntax is : | |
var firstName = "Random"; | |
(function(lastName){ | |
var firstName = "Mohan"; | |
console.log(firstName); | |
console.log(lastName); |