I was writing my js, when I come across the following error:
Uncaught TypeError: xyz is not a function
Released from code (shown simply):
(function () {
function abc() {
var xyz = xyz();
}
function xyz() {
console.log(123);
}
abc();
})();
As you can see, the function is present right away, so why do I get this error anyway?