Episode 13: FIRST CLASS FUNCTIONS 🔥ft. Anonymous Functions 🔥
function a(){
console.log("a")
}
a();
var b = function (){
console.log("b");
}
b();
function () {
}
Can only be used with function expression. It is unnamed function.
var b = function xyz(){
console.log(xyz);
}
b();
We can also name functions in JS func expressions.
Parameters: Labels/placeholders inside a function.
Arguments: The variables, entities that we pass in a function call.
Functions are first class citizens in JS. They can be passed as an argument, returned or stored as a value.