Sign in
Log inSign up
vanilla-js
vanilla-js
#vanilla-js-1
21 followers·289 articles
Popular this week 🔥
Chris Bongers
Kevin Pliester
Murilo Boareto Delefrate
romeo adjam
Kevin Pliester and 4 others are discussing this5 people are discussing this
andrei
Man, good job on writing and puttin you out there, but I made an account just to reply on this. Hate to see things overused just because they're shiny. I noted there was some legacy code that was using loops and wasn't really efficient with the tools we have nowadays. You replaced one completely fine loop with two loops and a ton of allocations. for is not freaking outdated. I think you meant to say "pretty" or "easier to follow", because the "modern" version is way, way less efficient than the original.
5
Discuss

·

117 likes

·

2.3K reads

Grégory D'Angelo
Nice explanation of Promises in JavaScript. And the fetching data example is an excellent choice to demonstrate how Promises work.
3