4 ms·
Uh, no Left Padding is NOT built-in in JavaScript. The proposal to add `String.prototype.padLeft()` was just added to ECMAScript 2016. JavaScript had a very mi
by joshmanders 11y ago
Uh, no Left Padding is NOT built-in in JavaScript. The proposal to add `String.prototype.padLeft()` was just added to ECMAScript 2016.
JavaScript had a very minimal standard library, it's pretty asinine of you to compare it to C or any other language with a pretty extensive standard library.
- raverbashing 11y agoI wanted to say that it's built-in in pretty much every other language apart from JS
- joshmanders 11y agoBut alas, here we are, talking about the JavaScript language and it's ecosystem. It's easy to say "I don't see why there's a need for an 11 line module to pad left on a string" when your language of choice has a robust standard library with such abilities built in.
- GFK_of_xmaspast 11y agoI've never thought of C as being a particularly good example of "extensive standard library."
- brudgers 11y agoC didn't get a standard (or a standard library) until 1989. It had been around for 17 years at that point. Two years after its invention, JavaScript was standardized in 1997. That's almost twenty years ago.