DEV Community


Discussion on: 10 JavaScript concepts you need to know for interviews

codypatnaude profile image

"Understand that objects, arrays, and functions are copied and passed by reference."

If something is passed by reference it is NOT copied. That's the whole point of passing by reference. May want to change the wording there.

arnavaggarwal profile image
arnav-aggarwal Author

That's the point. Arrays & objects are not copied when they're assigned, either using = or passed into a function. Only the reference is copied/passed in.

Forem Open with the Forem app