When I declare a function like this:
function x() { return 123 };
Then:
typeof x; //return "function"
typeof x(); //return "number"
That's ok, but once I create a variable like this:
var y = function x() { return 123 };
It becomes:
typeof y; //return "function"
typeof y(); //return "number"
typeof x; //return "undefined"
typeof x(); //return error
Why does x lose his function? Please helpp