Javascript Array Question 16

Introduction

What is the output of the following code?



let animals = new Array("dog","cat","seal","elephant","walrus","lion");
console.log(animals.indexOf("elephant")); 


3



PreviousNext

Related