loading
main.js
1
2
3
4
5
6
console.log(square); // square is hoisted with an initial value undefined.
console.log(square(5)); // Uncaught TypeError: square is not a function

var square = function (n) {
  return n * n;
}
Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie