3 ms·
Notice that lots of (probably most of; maybe even all) examples in the linked talk are due to unreasonable inputs. `true + true` doesn't make sense; `{}.toStrin
by azangru 4y ago
Notice that lots of (probably most of; maybe even all) examples in the linked talk are due to unreasonable inputs. `true + true` doesn't make sense; `{}.toString().call(new Date())` or `+[] === +![]` don't make much sense either. This is just not what developers do. Meanwhile, iterating over arrays is absolutely what developers do, on an hourly basis. Which is why I said that javascript doesn't have things like that — the papercuts it inflicts on you hour after hour after hour.
- ceejayoz 4y agoLaravel's Collection class means I don't ever touch a raw array, and I've never had a "left-pad" scenario happen to me with PHP. Both languages have their warts; neither's tends to be an issue in actual practice with an IDE and experience.