Created
February 8, 2021 06:54
-
-
Save numbnet/fa861132c074ee21f3d91d1d0677c5c8 to your computer and use it in GitHub Desktop.
JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h2>JavaScript Array Methods</h2> | |
<h2>push()</h2> | |
<p>The push() method returns the new array length.</p> | |
<button onclick="myFunction()">Try it</button> | |
<p id="demo1"></p> | |
<p id="demo2"></p> | |
<script> | |
var fruits = ["Banana", "Orange", "Apple", "Mango"]; | |
document.getElementById("demo1").innerHTML = fruits; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment