Do you know what will be the output of this code?
JavaScript
console.log(greet());
function greet() {
return "hi";
}
Show answer and explanation
The answer is "hi".
Function declarations are hoisted completely, body included. They can be called anywhere in their scope.