Javascript Function in 4 ways 1. Function Declaration function square(x){ return x * x; } 2. Function Expression const square = function (x) { return x * x; } 3. Arrow Function Expression const square = (x) => { return x * x; } 4. Concise Arrow Function Expression const square = x => x*x;
Comments
Post a Comment