I have found some people saying to use JSON but that said that another function wasn't defined and I've also tried Object.assign()
my issue is I have 2 identical objects however when I modify one the other changes its because they have the same index in memory is there any way to prevent this in js Thanks in advance :)
For example:
var obj1 = {
info: 5
}
var obj2 = obj1;
obj2.info += 1;
console.log(obj1.info == obj2.info) //returns true I don't want it to