Programming with JavaScript

JavaScript is high-Level Programming Language JavaScript, often abbreviated as JS, is a programming language that conforms to the specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.High-Level Programming Language JavaScript,often abbreviated as JS, is a programming language that conforms to the ECMAScript specification.

Functions

are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.

  Defining functions : function square(number) {return number *;}

Function declarations

A function definition (also called a function declaration, or function statement) consists of the function keyword, followed by:

The name of the function. A list of parameters to the function, enclosed in parentheses and separated by commas. The JavaScript statements that define the function, enclosed in curly brackets, {…}.The function square takes one parameter, called number. The function consists of one statement that says to return the parameter of the function (that is, number) multiplied by itself.

Operator:

For more information

© 2021