What is JavaScript?

Dynamic Typing

JavaScript is a dynamically typed language which means the type checking of variables is performed at runtime rather than at compile time. Further, in JavaScript a type of a variable is not declared by a programmer and is allowed to change at runtime.

Prototype Based Programming

JavaScript observes Prototype Based Programming (aka Classless Programming) paradigm which is a kind of Object Oriented Programming in which an object's properties do not come from an extension of some class but rather from cloning of another object which becomes the first object's prototype and its properties are being appended to that first object.

Class Based Programming

In addition to Prototype Based Programming ECMAScript 2015 (aka ES6) introduced Class Based Programming which is a kind of Object Oriented Programming in which properties inheritance takes place through extension of classes.

First Class Functions

JavaScript treats functions as first class citizens which means that functions can be a) passed as arguments to other functions, b) values returned by other functions, and c) pointed to by variables or stored as values. When a function accepts another function as an argument and/or returns a function it is called a higher order function. Other functions are called first order functions. An example of a higher order function is a map function.

Furthermore, JavaScript supports anonymous functions (aka function literals, aka lambda functions, aka blocks) which are functions that are not bound to any identifiers. Anonymous functions might be for example passed as arguments to higher order functions.

First class functions are a prerequisite of functional programming.


A single-line comment:

// This is a comment.
console.log("This is not a comment.") // But this is.

A multi-line comment:

a multi-line comment.

We use cookies and similar technologies to enhance the quality of services, maintain statistics and adjust marketing content. You will find more information in the Cookies Policy.

By clicking OK you grant consent to processing of your personal data by us and our Trusted Partners with the purpose of maintain statistics and adjustment of the marketing content pursuant to the Privacy Policy. If you wish to not grant that consent and/or limit its extent click Settings.