these are the central working units of javascript


These are the central working units of JavaScript. Almost all the scripting code employs one or more functions to obtain the desired result. If you desire your page to provide certain a user-defined functionality, then functions are a suitable way of doing so. Thus it is significant that you understand what a function is & how it works.

First let us understand the fundamental syntax of a function; then we see at how to call it. After that you have to know how to pass arguments and why you have to do this.

Lastly, you ought to know how to return a value from a function. The following code illustrates the implementation of function.

 Function example (a,b)

{

number += a;

alert('You have chosen: ' + b);

}

The function made above may be called by using the following syntax.

Example (1,'house')

Actually, when you define the function Example, you develop a new JavaScript command that you can call from anywhere on the page. When you call it, the JavaScript code inside the curly brackets {} is executed.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: these are the central working units of javascript
Reference No:- TGS0266460

Expected delivery within 24 Hours