I have two functions name init
One is declared using function declaration and another using function expression, like this:
function init() {
alert ('init 1');
}
var init = function(){
alert('init 2');
}
init();
When i call the init function it alerts init 2.
My question is:
1- Why javascript does not throw error as both functions have same name.
2- How can i call the first function?