DEV Community

loading...

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

Collapse
codypatnaude profile image
codypatnaude

"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.

Collapse
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