Created
July 22, 2017 21:59
-
-
Save sanrodari/914e9288753cb7c375164f493e9f3d06 to your computer and use it in GitHub Desktop.
Examples for `window.demoObject` and `window.demoArray`
This file contains hidden or 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>Example</title> | |
</head> | |
<body> | |
<script> | |
window.demoObject = {}; | |
window.demoArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
function handleClick(e) { | |
console.log("I'm window.demoObject", window.demoObject); | |
console.log("I'm window.demoArray", window.demoArray); | |
} | |
</script> | |
<button onclick="window.handleClick()">Click me!</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment