Category JavaScript

JavaScript Array concat() Method

JavaScript array concat() method joins (or concatenates) two or more arrays. It is used to merge elements of two or more arrays in JavaScript. It returns a copy of a new array containing the joined (or merged) arrays. The joined…

JavaScript For Of Loop (with Examples)

ES6 introduced a new type of loop statement for of loop in JavaScript. This new loop works with iterable objects. Iterable objects are arrays, strings, sets, and maps that represent a sequence or set of elements. Other iterable objects are…

JavaScript For In Loop (with Examples)

JavaScript for in loop is another type of for loop for dealing with objects. We use this loop statement for looping or iterating through all properties of an object in JavaScript. In other words, for…in loop statement is used to…

Arrays in JavaScript

JavaScript array example

An array in JavaScript is an ordered set of data (or values) represented by a single variable name. In JavaScript, an array is basically a user-defined object that represents a collection of different data type of elements. Array uses a…

Arrow Function in JavaScript

Arrow function is the feature introduced in the ES6 version of JavaScript. It enables us to create functions in a cleaner and shorter way compared to normal functions. For example, this normal function // Function expression let sum = function(num1,…