What is JavaScript?
•
JavaScript is a scripting language that is used to add interactivity
and behaviors to web pages.
–
JavaScript can update and change both HTML and CSS, calculate,
manipulate and validate data.
–
JavaScript is a full programming language that contains variables,
functions, conditional statements, loop statements, data structures, etc.
<script>
function myFunction(a, b)
{
var result = a * b;
return result;
}
var x = myFunction(2, 5);
document.getElementById("resultlocation").innerHTML = x;
</script>