Use the length property to add a new item to myArray: SQL. - Javascript Array

Javascript examples for Array:Quiz

Description

Use the length property to add a new item to myArray: SQL.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
var myArray = ["CSS", "HTML", "Javascript"];
myArray[myArray.length] = "SQL";
document.getElementById("demo").innerHTML = myArray;
</script>//from  ww  w  .  j a  va2 s  .  c  om

</body>
</html>

Related Tutorials