Display the "HTML" item of the myArray array using the index number - Javascript Array

Javascript examples for Array:Quiz

Description

Display the "HTML" item of the myArray array using the index number

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var myArray = ["CSS", "HTML", "Javascript"];
document.getElementById("demo").innerHTML = myArray[1];
</script>/*from   w w  w  . jav a 2  s.  com*/

</body>
</html>

Related Tutorials