Functions hoisting in JavaScript

We have three ways to declare a function in JavaScript

1-) function declaration

2-) function expression

3-) arrow function

1-) function declaration

Function declaration is a traditional way to write a function with function name like this traditional way.

We could be able to execute the function above this code or below this code.

On picture 1, We are executing the function before writing the function, This way is called…