Puzzle 7 of 15 · References
Follow two variables assigned to an array, then an element update through one variable. Predict what the other variable reads. Choose an output below, then check the explanation. No signup needed. Browse puzzles by topic →
1const first = [1, 2]; 2const second = first; 3second[0] = 9; 4console.log(first.join(","));
Predict the console output. Each line is a separate log.
1,2
9,2
9,9
TypeError