Is it officially safe to:
someArray = someArray.filter(function(item) {
return item !== 'something';
});
I mean assigning back to the same array the filter function is called for, in one line. And same question for all other array prototype functions that return an array.
Yes, it's safe because it's returning the value from the function.
You should be careful about making sure you're reusing it correctly, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With