If an array with name as "names" contain three elements, then how will you print the third element of this array?
Answer / Kori Ravindra Kumar Ramnihor
To print the third element of an array named 'names', you can use bracket notation. For example: console.log(names[2]);
| Is This Answer Correct ? | 0 Yes | 0 No |
What is missing in my code? function numberTally(numList) { var evenTotal = 0; var oddTotal = 0; for (var i = 0; i <= numList.length; i++) { if i % 2 { // i is odd oddTotal += numList[i]; // or oddTotal = oddTotal + numList[i]; } else { // i is even evenTotal + numList[i]; } } alert(oddTotal); return evenTotal; }
what is the difference between window & document in javascript?
what is the purpose of using jsp?
Why extending array is bad idea?
What does javascript do?
How to write a function in javascript?
If an array with name as "names" contain three elements, then how will you print the third element of this array?
What's the Difference Between Class and Prototypal Inheritance?
Hi Friends, I am new to java, please provide some use full docs, and where can i get basic Java script docs... thanx in advance
What is the difference between a web-garden and a web-farm?
What are exports and imports?
How to import all exports of a file as an object.