3 ms·
JavaScript has things like left-pad because it doesn't have a standard library of modules for common tasks like other languages do, and because some of its buil
by ubernostrum 9y ago
JavaScript has things like left-pad because it doesn't have a standard library of modules for common tasks like other languages do, and because some of its built-in types don't have the same rich set of operations as other languages.
- Babooster 9y agohttp://www.haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/ http://www.haneycodes.net/npm-left-pad-have-we-forgotten-how... is a nice article on the subject of left-pad. If you can't implement a left-pad in less than 5 minutes yourself, you don't know how to code.
- Ajedi32 9y agoJust because you _can_ spend 5 minutes re-inventing the wheel in every project you write, doesn't mean you _should_.