Forbrukslån | Sähkövertailu 2017 | Beste Kredittkort med Rabatt | Strømleverandør | Beste Tyverialarm 2017 | Forsikring Sammenligning | Billigste Mobilabonnement 2017 | Billige Varmepumper
JavaScript programming

the function argumentasa of return javascript

Some function arguments are used. Argument can be thought of as a function of the input. The first function is used to create the function keywords. The name of the function to specify the number of arguments in brackets are fast. If multiple arguments comma (,) is used to denote separately. No value as arguments, strings, variables, or even any other function can be used. For example document.write (Math.abs (-55.69));

Practice Project:

<html>
<head>
<title> www.trickbd.com.bd</title>
<style>
body{background: #FFC;
font-size:20px;}
h2{color:#FF0066;}
</style>

<script type = “text/javascript”>
function Add_value(value1,value2)
{
var result = value1 + value2;
return result;
}
</script>

</head>
<body>
<script type = “text/javascript”>
document.write(Add_value(10,15));
document.write(“<br />”);
document.write( Math.abs(-55.69));
</script>
</body>

</html>

Notepad: to open a file type from the menu at the top of layer code by clicking on the Save as File name: index.html, Save as type: All files, save and open the index.html file with the Mozilla Firefox look like the image shown below.

25
55.69

Program Analysis:

function Add_value (value1, value2) Add_value the name of the function have been created, (value1, value2) has been directed by a function of two arguments.

var result = value1 + value2; By adding the two variables passed as arguments to save the result as a variable has been ordered.

return result; The result has been instructed to return the variable value.

document.write (Add_value (10,15)); Through the input of the two arguments 10 and 15 Add_value () function is called. As a result, the browser is 10 + 15 = 25 to 25 will be displayed.value a result of the return.

document.write (Math.abs (-55.69)); In the case of the argument has been used as a function. Math.abs (-55.69) of the tuitohost 55.69 -55.69 will return.

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment