DEV Community

Nouman Ali
Nouman Ali

Posted on

7 javascript trick you must know..

you can get sum of an array using built in method provided by javascript, resize the array as well
Image description

you can shuffle an array with few lines of code using javascript, and filter the unique values from an array

Image description

you can actually use comma to store actually values in some variable, and you can swap values using array destructuring concept

Image description

Top comments (0)