Comment

Comment by splash123

In other programming languages, it's "by value" vs. "by reference."

One of the most confusing parts of dealing with immutability in JavaScript is understanding the array methods. "Officially", some of them are mutating, e.g., `.sort()`, while others create and return a copy, e.g., `.slice()`.

It makes the 10-day rumor more convincing though.

parent splash123 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton