Last active
June 13, 2018 03:56
-
-
Save AminBusiness/30ce170b7af6ec9fc9c5554045283381 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
function main() { | |
var lcv; | |
var months = new Array(13); //Create an Array object | |
months[0] = ""; | |
months[1] = "January"; | |
months[2] = "February"; | |
months[3] = "March"; | |
months[4] = "April"; | |
months[5] = "May"; | |
months[6] = "June"; | |
months[7] = "July"; | |
months[8] = "August"; | |
months[9] = "September"; | |
months[10] = "October"; | |
months[11] = "November"; | |
months[12] = "December"; | |
//Loops through the 12 months in order | |
for(lcv in months) | |
{ | |
document.write("Month " + lcv + " is " + | |
months[lcv] + "<br />"); | |
} | |
} |
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 lcv; | |
var months = new Array(13); //Create an Array object | |
months[0] = ""; | |
months[1] = "January"; | |
months[2] = "February"; | |
months[3] = "March"; | |
months[4] = "April"; | |
months[5] = "May"; | |
months[6] = "June"; | |
months[7] = "July"; | |
months[8] = "August"; | |
months[9] = "September"; | |
months[10] = "October"; | |
months[11] = "November"; | |
months[12] = "December"; | |
//Loops through the 12 months in order | |
for(lcv in months) | |
{ | |
document.write("Month " + lcv + " is " + | |
months[lcv] + "<br />"); | |
} | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function main() { | |
var lcv; | |
var months = new Array(13); //Create an Array object | |
months[0] = ""; | |
months[1] = "January"; | |
months[2] = "February"; | |
months[3] = "March"; | |
months[4] = "April"; | |
months[5] = "May"; | |
months[6] = "June"; | |
months[7] = "July"; | |
months[8] = "August"; | |
months[9] = "September"; | |
months[10] = "October"; | |
months[11] = "November"; | |
months[12] = "December"; | |
//Loops through the 12 months in order | |
for(lcv in months) | |
{ | |
document.write("Month " + lcv + " is " + | |
months[lcv] + "<br />"); | |
} | |
}</script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment