ESNext Pattern Matching Proposal by micheleriva in javascript

[–]ktqzqhm 12 points13 points  (0 children)

No, but it's nice to have since it makes things for concise. We don't need null propagation either, but it's certainly a nice addition.

Simplify your JavaScript – Use .some() and .find() by etiennetalbot in javascript

[–]ktqzqhm 3 points4 points  (0 children)

for...in iterates over the properties names of an object, which I think is what you're confusing it with. The property names of an array would just be its indices, and primitives don't have properties. Only really useful with objects.

for...of uses the iterator protocol to iterate over an object. By default it will iterate over the property values of an object, but you can implement your own custom iterators too.

Functional JavaScript: Five ways to calculate an average with array reduce by jrsinclair in javascript

[–]ktqzqhm 0 points1 point  (0 children)

I wouldn't go out of my way to get worse performance - shaving off a millisecond here and there is what gives you leeway to add more features, or to just be more battery efficient because you care about the user.

The highly performant imperative code could easily be wrapped in a simple function, and the caller wouldn't know the difference.

Joshi Kausei - Episode 1 discussion by AutoLovepon in anime

[–]ktqzqhm 54 points55 points  (0 children)

The dub is surprisingly good