Can someone explain what happens in the below scenario:(this was an interview question)
function test(a){
alert(a);
}
function test(a,b){
alert(a,b);
}
function callTest(){
test(a);
test(a,b);
}
I was asked how the javascript calls the methods, and what happens behind the scenes in this scenario
alertonly takes one argument, so the second will be ignored.