I recently reviewed a PR and saw the following.
const parts = someString.split('.');
return parts[parts.length - 1];
was changed to
const [last] = someString.split('.').reverse();
return last;
I commented that I am against the change for the reasons that it is harder to read and not performant.
The answer was that it is only hard to read, because I am not used to it and that performance does not matter if you use big frameworks like React for example.
Who is right and why?