4 ms·
For example there are 3 String methods to take a substring (substring, substr, slice) (there's even 4th way in proposal: https://github.com/tc39/proposal-slice-
by 11235813213455 7y ago
For example there are 3 String methods to take a substring (substring, substr, slice) (there's even 4th way in proposal: https://github.com/tc39/proposal-slice-notation https://github.com/tc39/proposal-slice-notation)
The last added one is slice, and actually simplifies things, with its consistency with Array.prototype.slice, and replace the old ones
I agree it's annoying to keep old methods for backward-comptibility