3 ms·
But that LITERALLY is memorizing implementation details. Here are the rules for JS, which I happen to know, because I use it often: 1. Javascript is always pa
by horsawlarway 9y ago
But that LITERALLY is memorizing implementation details.
Here are the rules for JS, which I happen to know, because I use it often:
1. Javascript is always pass by value, but when a variable refers to an object (including arrays), the "value" is a reference to the object.
2. Changing the value of a variable never changes the underlying primitive or object, it just points the variable to a new primitive or object.
3. Changing a property of an object referenced by a variable does change the underlying object.
Those are not trivial "just infer it" details. That's highly language specific, and absolutely unrelated to the skills the test claims to be evaluating.
- deleted 9y ago[deleted]