DEV Community

Cover image for Shortening an array: | Javascript tip πŸ’‘
Atif Riaz
Atif Riaz

Posted on

Shortening an array: | Javascript tip πŸ’‘

Shortening an array:
The following example shortens the array "arrayofnumbers" to a length of 3 if the current length is greater than 3.

Top comments (0)