Created
May 28, 2020 22:22
-
-
Save lewdev/12099d7722a5903dab54166d2bbff3e5 to your computer and use it in GitHub Desktop.
A minimal JavaScript/HTML page for testing out some JavaScript. I always get warnings for the charset not being there.
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"><title>Template</title></head> | |
<body> | |
<div id="output"></div> | |
<script> | |
window.onload = function() { | |
var i | |
, row | |
, output = document.getElementById("output") | |
, size = data.list.length | |
, arr = [] | |
; | |
for (i = 0; i < size; i++) { | |
row = data.list[i]; | |
arr.push(row); | |
} | |
output.innerHTML = arr.join(""); | |
}; | |
var data = { | |
"list": "a,b,c,d,e,f".split(",") | |
}; | |
</script> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment