{ 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:

Untitled

Untitled

Untitled

Untitled

ye imp hai, 3 type se function define kar sakte hai

  1. function name(a,b){}
  2. let k = function(a,b){};
  3. let m = (a,b)⇒{};

isme agar aise hi run karna ho to, 2 will work best.