Ovis Creative interview question

How does hoisting work in JavaScript?