Number 9 is my favorite.
For number 4 if you want to empty an array declared with var or let I think it better to reassign it with an empty array instead:
varfruits=[“banana”,“apple”,“orange”,“watermelon”,“apple”,“orange”,“grape”,“apple”];fruits=[];//do this not fruits.length = 0;
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Number 9 is my favorite.
For number 4 if you want to empty an array declared with
var
orlet
I think it better to reassign it with an empty array instead: