pass-by-value
nounUK /ˌpɑːs baɪ ˈvæljuː/
US /ˌpæs baɪ ˈvæljuː/
Pass-by-value is when a computer gives a copy of information to a function so the original stays the same.
In pass-by-value, changing the number inside the function does not change the number outside.
RELATED WORDS
OTHER MEANINGS
2. A programming rule where a function receives its own copy of each argument.
C uses pass-by-value for simple numbers by default.
3. A way of sending data where the receiver cannot change the sender's original data.
Because of pass-by-value, the original list was safe from edits.
4. A teaching term for explaining how copies protect original values in code.
The teacher used pass-by-value to show why the score stayed the same.