CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #14

Writing to an Array Slot

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