Domanda di colloquio di Elastic

What is hoisting in JavaScript and what is it used for?