Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass by value or reference question #97

Open
dsaw opened this issue Feb 16, 2025 · 0 comments
Open

Pass by value or reference question #97

dsaw opened this issue Feb 16, 2025 · 0 comments

Comments

@dsaw
Copy link

dsaw commented Feb 16, 2025

Hi. NIce set of questions, kudos to you for maintaining it for free.

I think the solution is that JS should be pass by value because even objects are references which are passed by value (by the reference itself). A new reference is not created like in C++ (using & operator) [0].

[0] https://stackoverflow.com/questions/518000/is-javascript-a-pass-by-reference-or-pass-by-value-language. Check the top answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant