Difficulty: 3/10hoisting, function declarations, scope and execution context1The function statement declares a function.2A declared function is 'saved for later use', and will be executed later when it is invoked (called).javascriptCopyScenario Questions0-2 years experience1We have a legacy file where some helper functions are called at the top of the file, but they are defined at the very bottom. Some of them work fine, but others throw a 'TypeError: undefined is not a function'. What is the difference in how these functions were declared that causes this behavior?2Imagine you are writing a utility module. You need to choose between writing 'function calculateTax() {}' and 'const calculateTax = () => {}'. How does your choice affect where in the file you can actually invoke this utility?Follow-up QuestionsHow does JavaScript's strict mode alter the scoping of a function declaration inside an if-statement?If a variable declared with var and a function declaration share the exact same identifier, how does the interpreter resolve the conflict during hoisting?Under what circumstances would you deliberately choose a function declaration over an arrow function expression?Suggest Improvement