DEV Community

Discussion on: 3 ways to empty an Array in JavaScript

Collapse
 
feriun profile image
Farhad

Your Topics are interesting 👍
Which method do you think will be the best in case of readability and performance?

I will chose assigning it to a new empty array baratheon = []

Collapse
 
sanchithasr profile image
Sanchithasr

Assigning it to new empty array is the faster way.

Some comments have been hidden by the post's author - find out more