Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 371 Bytes

File metadata and controls

16 lines (10 loc) · 371 Bytes

Named Function

const namedFunction = function (params) {
   console.log("hello " + params);
}
namedFunction("hello");
// console.log(window.namedFunction("hello")) //  hoisted in browser
console.log(global.namedFunction("hello")) // not hoisted in node.js

Named Functions are not hoisted. {.fragment .current-only data-code-focus=1-1}