Define a named function in javascript.



Define a named function in javascript...

Answer / Chhavi Sagar

A named function in JavaScript is defined using the Function Declaration syntax: function functionName(parameters) {nt// function bodyn}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What would you use javascript for?

1 Answers  


Is javascript necessary for web development?

1 Answers  


What is the difference between let and var?

1 Answers  


hi i want validations for two drop down lists. when user enter to second list by skipping first list alert box should appear. <HTML><HEAD> <TITLE>drop down validation</TITLE> <script type="text/javascript"> function validateForm(){ if(document.ItemList.Item.selectedIndex==0) { alert("Please select item from first list."); document.ItemList.Item.focus(); return false; } return true; } </SCRIPT> </HEAD> <BODY> Please choose an item from the drop down menu: <form name="ItemList" method="post" action="asp.html" onsubmit="validateForm()"> <table width="100%" border="0"> <tr> <td width="135">Choose a username: </td> <td> <select name="Item"> <option value selected> SELECT </option> <option value>Apples</option> <option value>Oranges</option> </select> <table width="100%" border="0"> <tr> <td width="135">Choose a username: </td> <td> <select name="Item" onclick="validateForm()"> <option value selected> SELECT </option> <option value>Apples</option> <option value>Oranges</option> </select> <input type="submit" name="Submit" value="Submit"> </td></tr></table></form> </BODY> </HTML> please any body help me thanks

1 Answers  


Why is javascript used for web pages?

1 Answers  


Can you explain about screen object?

1 Answers  


What are the characteristics of javascript ‘strict mode’?

1 Answers  


How do I enable cookies and javascript?

1 Answers  


Is a relation always a function?

1 Answers  


How do we get javascript onto a web page?

1 Answers  


What are exports & imports?

1 Answers  


What does e mean in a function?

1 Answers  


Categories