[Solved] javascript array assign to multiple variables
function Case(values){ console.log(“values: ” + values); var A = []; var B = []; var C = []; var i = 0; while(i < values.length) { A.push(values[i++]); B.push(values[i++]); C.push(values[i++]); } console.log(“A: ” + A); console.log(“B: ” + B); console.log(“C: ” + C); } var values = [5, 4, 3, 6, 7 , 8]; Case(values); values … Read more