Preventing hoisting in javascript

I have learned about hoisting recently in JS, aside from using const and let to prevent hoisting would it be advisable to change all function statement to function expressions?.

My justification is that hoisting creates unpredictability in code and I think that using function expressions make your code more predictable.

IMO, it’s upto your style of coding. Some people like to put their function declarations at the bottom of files and use hoisting.

There are still some gotchas with arrow functions especially with bindings with this. If you won’t run into these problems, go head and use arrow functions.