Answer: The second method will be executed first
Code snippet.
<script>
function demo(s)
{
alert("first"+"---"+s);
}
function demo(s)
{
alert("Second"+"--"+s);
}
demo("javascript");
demo("jscript");
demo("jp");
</script>
output:
//In this example, the function with alert("Second"+"---"+s); statement will
//be executed 3 times, while the first function will not execute at all.
|
Alert Moderator