JS function

PHOTO EMBED

Tue Dec 01 2020 08:55:17 GMT+0000 (Coordinated Universal Time)

Saved by @Amna #javascript

<!DOCTYPE html>
<html>
<body>
​
<h2>JavaScript Functions</h2>
​
<p>This example calls a function which performs a calculation and returns the result:</p>
​
<p id="demo"></p>
​
<script>
var x = myFunction(4, 3);
document.getElementById("demo").innerHTML = x;
​
function myFunction(a, b) {
  return a * b;
}
</script>
​
</body>
</html>
​
content_copyCOPY

https://www.w3schools.com/js/tryit.asp?filename