In memory constrained devices the use of .map() is not always possible. In such places, this should determine whether a mutation is better than creating a new array from scratch while emptying the original array, thus, keeping somewhat the same memory usage.
Comparing performance of: Mutate array vs Memory efficient map
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory