Elastic Interview Question

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