You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(sum(10, 20)); // this will work fine because normal functions are hoisted.
// normal function
function sum(a, b) {
return a + b;
}
// console.log(sum2(10, 20)); // this will not work because Arrow functions are not hoisted as they are also function expressions where the function is assigned as a value to the variable