A function is defined with the function keyword, followed by a name, followed by parentheses(). - Javascript Function

Javascript examples for Function:Quiz

Description

A function is defined with the function keyword, followed by a name, followed by parentheses().

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
function myFunction() {//from w w w .  jav  a 2s  .co m
    document.getElementById("demo").innerHTML = "Hello World!";
}
myFunction();
</script>

</body>
</html>

Related Tutorials