Last active
June 13, 2018 03:58
-
-
Save AminBusiness/a1aa991b8da5f8d493d4935259e1431e to your computer and use it in GitHub Desktop.
// source https://jsbin.com
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function main() { | |
var names1 = new Array(); //Create an Array object | |
names1[0] = "Jeff"; | |
names1[1] = "Sandy"; | |
names1[2] = "Taylor"; | |
names1[3] = "Mackenzie"; | |
names1[4] = "Chloe"; | |
names1[5] = "Lacey"; | |
document.write("The original array contains these names:" + | |
"<br>" + names1); | |
var firstNameInArray = names1.shift(); | |
document.write("<br><br>The first name in the array is:" + | |
"<br>" + firstNameInArray); | |
document.write("<br><br>The names1 array now contains these names:" + | |
"<br>" + names1); | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function main() { | |
var names1 = new Array(); //Create an Array object | |
names1[0] = "Jeff"; | |
names1[1] = "Sandy"; | |
names1[2] = "Taylor"; | |
names1[3] = "Mackenzie"; | |
names1[4] = "Chloe"; | |
names1[5] = "Lacey"; | |
document.write("The original array contains these names:" + | |
"<br>" + names1); | |
var firstNameInArray = names1.shift(); | |
document.write("<br><br>The first name in the array is:" + | |
"<br>" + firstNameInArray); | |
document.write("<br><br>The names1 array now contains these names:" + | |
"<br>" + names1); | |
}</script></body> | |
</html> |
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
function main() { | |
var names1 = new Array(); //Create an Array object | |
names1[0] = "Jeff"; | |
names1[1] = "Sandy"; | |
names1[2] = "Taylor"; | |
names1[3] = "Mackenzie"; | |
names1[4] = "Chloe"; | |
names1[5] = "Lacey"; | |
document.write("The original array contains these names:" + | |
"<br>" + names1); | |
var firstNameInArray = names1.shift(); | |
document.write("<br><br>The first name in the array is:" + | |
"<br>" + firstNameInArray); | |
document.write("<br><br>The names1 array now contains these names:" + | |
"<br>" + names1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment