MDN Web Docs @developer.mozilla.org · May 1

JavaScript now has non-mutating array methods ✨ `toSorted()`, `toReversed()`, `toSpliced()`, and `with()` return new arrays instead of modifying the original. No more [...arr].sort() to avoid side effects. Learn more 👇 developer.mozilla.org/en-US/docs/...

194 likes 9 replies

?

Replies

@bmod.bsky.social · May 2

😯💥👁️‍🗨️🚨🚀 What's with the fucking emoticons everywhere these days

@dieselm8tion.bsky.social · May 1

Ummm unrelated, but what theme is that? I'm digging the blues and geeen

Prime Ministah · May 1

When I was coding JavaScript in the 90s EVERYTHING was global. The concept of scope was a pipe dream

Transitional Fossil · May 1

just more memory consumed.

alBz · May 1

ZorroTicToc · May 2

One could argue that the sorting is wrong for months.

Iscalus Weir · May 1

I'll be sure to mention that to the job I can't get an interview for because an AI replaced me

Mickey · May 1

Gonna ask probably a stupid question. In the first sort you leave it blank, and it’s obviously alphabetical. In the second sort the function you pass in is a-b, what is that doing to the sort?

Money Is Fake · May 1

So, it can do something every other language has been able to do all along?