What will be output of following code
doit();
var doit = function (){
alert('x');
}
Output will be:- Uncaught TypeError: doit is not a function because function expressions in JavaScript are not hoisted. Therefore, you cannot use function expressions before defining them