I was trying to assign multiple variables that i stored in an array to different variables that i stored in an array using the for loop. Here is what i have tried but didn't get my wanted result. Instead it changed the variable array to the contents in the other array.
let varOne, varTwo, varThree;
let varArray = [varOne, varTwo, varThree]
let valueArray = ['value-one', 'value-two',
'value-three']
for (let i = 0; i < varArray.length; i++) {
varArray[i] = valueArray[i]
}
javascript object, it contains key value.