Created
July 24, 2016 17:22
-
-
Save uyu423/1f3348787d04012ff9d6cf080bfd739c to your computer and use it in GitHub Desktop.
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
<head> | |
<title>JSON Basic</title> | |
<meta charset="utf-8"/> | |
</head> | |
<body> | |
<script> | |
/* Array and Object Definition */ | |
var arr = [ "Yongwoo", 25, "Catholic Univ, of Korea", "Computer Science" ]; | |
var obj = { "NAME" : "Yongwoo", "AGE" : 25, "UNIVERSITY" : "Catholic Univ, of Korea", "MAJOR" : "Computer Science" }; | |
/* Array and Object Value Check */ | |
document.write("<b>Normal String Arrary :</b> ", arr, "<br/>"); | |
document.write("<br/><b>Normal Object</b><br/>"); | |
for(var objVarName in obj) { | |
document.write(objVarName, " : ", obj[objVarName], "<br/>"); | |
} | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment