{ console.log("c"); } (function () { let x = "Hello!!"; // I will invoke myself console.log("x"); })();"> { console.log("c"); } (function () { let x = "Hello!!"; // I will invoke myself console.log("x"); })();"> { console.log("c"); } (function () { let x = "Hello!!"; // I will invoke myself console.log("x"); })();">
function a(){
console.log("a");
}
let b =function(){
console.log("b");
}()
let c = ()=>{
console.log("c");
}
(function () {
let x = "Hello!!"; // I will invoke myself
console.log("x");
})();
all this can be writen in arrow functions
chapter 2: functions:
ye imp hai, 3 type se function define kar sakte hai
isme agar aise hi run karna ho to, 2 will work best.