CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Writing to an Array Slot

JavaScript code walkthrough · Question 14
easyArrays

Code

Read carefully. What does this print?
1let arr = [10, 20, 30];
2arr[1] = arr[0] + arr[2];
3console.log(arr[0] + " " + arr[1] + " " + arr[2]);

Your answer