DEV Community

Discussion on: 3 ways to empty an Array in JavaScript

sturpin profile image
Sergio Turpín

Good post Sanchithasr!

I know another, but it's slower in terms of performance

while (baratheon.length > 0) {
Enter fullscreen mode Exit fullscreen mode
sanchithasr profile image
Sanchithasr Author

Yes. It's very slow when it comes to performance.

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