After writing so much Rust lately, I wish JavaScript had ranges. I’ve started faking them a bit using Arrays and Array.fill, i.e. creating pagination: Array(Math.ceil(total / limit)) .fill(1) .map((n, i) => ( <a href=‘?offset=${i * limit}’> {n + i} </a> ))
hah, funny you mention that - I was reading some Ruby last week and thought the exact same thing! They're definitely more to the point than JS for loops :D
-
-
Yea, especially when you just need an arbitrary iterator. I like thinking about everything as an iterator now.

-
Lol this was me just few weeks ago!
Guess someone will have to champion this through @TC39 now
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.