DEV Community

Dheeraj Kumar Rao
Dheeraj Kumar Rao

Posted on

{… Many ways in JavaScript }

IIFE(Immediately Invoked Function Expression)

An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.

Here we are going to write IIFE by 12 ways.

Creating Arrays

The JavaScript Array object is a global object that is used in the construction of arrays; which are high-level, list-like objects. For this topic I would like to say thanks to 2ality.com .

Here we are going to create array by 10 ways.

Define Function

Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure — a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.

Here we can write function by 6+ ways.

Covert to Number

The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor. A primitive type object number created using the Number() function.

Here we can convert string to Number by 9 ways.

Top comments (0)