We have declared an array of selected month names let summer = [ “June”, “July”, “August”];. We want to change the value “July” stored in the array to the number 7:
- summer[1] = 7;
- We cannot do this (an array can only contain elements of the same type).
- summer[0] = 7;
- summer.July = 7;
More Questions: JavaScript Essentials 1 – JSE1: Module 2 Test
Please login or Register to submit your answer