All Posts About JavaScript

Math Constants and Functions in JavaScript

Math Constants and Functions in JavaScript

Ashish Lahoti

In this tutorial, we’ll learn about Math Object in JavaScript, which allows us to use mathematical constants such as π, e, √2 and perform mathematical operations on numbers such as pow(), sqrt(), max(), min(), random(), abs(), ceil(), floor(), round(), and truc().

How to Clone an Array in JavaScript

How to Clone an Array in JavaScript

Array.slice(), Array.from(), Array.map() and Spread Operator (...)

Ashish Lahoti

In this tutorial, we’ll learn how to clone an Array in JavaScript and also learn the difference between shallow copy and deep copy of an Array.