3 ms·
Is the y relevant? Sort is in place and without a comparator function, it's going to convert the numbers to strings, so the array will remain the same. If the
by colmvp 5y ago
Is the y relevant? Sort is in place and without a comparator function, it's going to convert the numbers to strings, so the array will remain the same.
If the question is about const, const with Arrays/Objects are by reference rather than value, nothing is stopping them from being modified later in the code.