Javascript Programming

What is Function In Javascripts ?

In this tutorial, we will Learn What is Function In Javascript

What is Function? -> A function is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing the same code again and again

Define Function In Javascript?

we need to define Function. common way to define a function in JavaScript is by using the function keyword


<script type = "text/javascript">
      function functionname(parameter-list) {
         // statements

Simple Example :-

<script type = "text/javascript">
      function sayHello() {
         alert("Hello there");

Related posts

Addition Subtraction Multiplication Division Using Ajax

Mayur Tekwani

JavaScript Date Print On Web Page


Loops In JavaScript – 2

Mayur Tekwani

Leave a Comment