let arr = [];
let obj {case:''};
after I did below code twice,
arr.push(obj)
I got arr below
[{…}, {…}]
0: {case: ''}case:
1: {case: ''}
length: 2[[Prototype]]: Array(0)
and I just want to push certain value (ex. 'a') in first object.
so, I did below code
arr[0].case = 'a'
but, second object is also changed like below
(2) [{…}, {…}]
0: {case: 2}
1: {case: 2}
So, I want to know how to push certain value in certain object in an array.