In JavaScript, how data is passed to a function depends on the type of value.JavaScript is technically pass-by-value, but objects behave like pass-by-reference.
1.Primitive Types → Passed by Value
Primitive types in JavaScript:
- Number
- String
- Boolean
- undefined
- null
- Symbol
- BigInt
