JavaScript Array Question 7

Introduction

What is the output of the following code?

let myIndexedArray = ["apple", 12, true, "hello world"];

console.log( myIndexedArray[0]);    
console.log( myIndexedArray[1]);    
console.log( myIndexedArray[2]);    
console.log( myIndexedArray[3]);    

myIndexedArray[2] = "I'm a string!"
console.log( myIndexedArray[2] );   


apple
12
true
hello world
I'm a string!



PreviousNext

Related