2 ms·
The semantics are pass-by-value, but objects are always references, so only the references are copied. That said the JavaScript spec does not require any specif
by goto11 4y ago
The semantics are pass-by-value, but objects are always references, so only the references are copied. That said the JavaScript spec does not require any specific implementation and implementation may chose various optimizations.