Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Arrays</h1>
<h2>The new Array() Method </h2>
<p id="demo"></p>
<script>
//Create an Array
const cars = new Array();
//Add Values
cars.push("Saab");
cars.push("Volvo");
cars.push("BMW");
document.getElementById("demo").innerHTML = cars;
</script>
</body>
</html>