Which of the following client side java script function will be called on button click event? Three functions with same name but no. of arguments were different.

function func1(arg1) {
alert('func1 which has one arguments called!');
return false;
function func1(arg1, arg2) {
alert('func1 which has two arguments called!');
return false;
function func1(arg1, arg2, arg3) {
alert('func1 which has three arguments called!');
return false;

 Posted by Dhirendra on 7/18/2011 | Category: JavaScript Interview questions | Views: 6969 | Points: 40
Select from following answers:
  1. func1 which has one argument gets called!
  2. func1 which has two arguments gets called!
  3. func1 which has three arguments gets called!
  4. All Above

Show Correct Answer

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Easwaran on: 9/14/2012 | Points: 10
Could you please do explain the situation when this would be called? It would be great if you provide sample.

Login to post response

More Interview Questions by Dhirendra