Pregunta de entrevista de Elastic

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