the function tag in js
<html>
<p id = demo> </p>
<p> this javascript function is returning the product of p1 and p2.
<script>
function myFunction (p1, p2){
return p1 * p2
}
document.getElementById("demo").innerHTML = myFunction(8, 8)
</script>function myFunction() {
console.log('Party time')
}
myFunction();<html>
<head>
</head>
<body>
<p id = demo> </p>
<script>
function myEquation(p1, p2, p3, p4) {
return p1 * p2 * p3 * p4
}
document.getElementById("demo").innerHTML = myEquation(8, 7, 1, 9);
</script>
<p> 504 is the answer of my function that made the script say 8x7x1x9.
</body>
</html>
Also in JavaScript:
- group all items with same name js
- dom element get attribute
- radio button group get value javascript
- set stange beckground color easeljs
- console.log ejs
- react native background image
- auto form submition at countdown end javascript
- reduce()
- quill js server side delta
- each function jquery stack overflow
- fetch api in js
- user property in express jwt
- export apk react native
- update node js version ubuntu
- functional component react with state
- nodejs format text
- javascript dice throw
- get children length jquery
- local storage javascript
- javascript promise.all
- javascript steps
- loading screen html css js
- how to make a deck of cards in javascript
- return array javascript