ES2023 array copy & change methods

By Beej

Nice! javascript now has built in one liner for copy & update array item by index Array.with()

and a few other non-mutating companions like toSpliced, toSorted

sure, the array spread syntax already made it pretty easy but it’s just cool to see super common patterns get this kind of TLC

Tags: JavaScript Dev
Share: Twitter Facebook LinkedIn