Ali Bawi
New member
- Joined
- Jan 10, 2023
- Messages
- 1
- Programming Experience
- 10+
I have a function that accept parameter (params object[]).
When the function is called with null value for the parameter the called function received a value for this parameter {object[0]} this parameter passed to another function
in the function implementation the parameter has a value of {object[2]} with values [0] null, [1] {object[0]}.
It is as the function is making new object {} for each time we pass the parameter.
Why is this happening we only want to pass the null value without creating new object.
As the images shown
When the function is called with null value for the parameter the called function received a value for this parameter {object[0]} this parameter passed to another function
in the function implementation the parameter has a value of {object[2]} with values [0] null, [1] {object[0]}.
It is as the function is making new object {} for each time we pass the parameter.
Why is this happening we only want to pass the null value without creating new object.
As the images shown