Created
January 25, 2019 01:08
-
-
Save kimtree/9632d53f932371dd538d7c3916104f66 to your computer and use it in GitHub Desktop.
LINE 2019 FrontEnd Quiz
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
// data cherry-picked from https://gist.github.com/nigayo/ade2c3f74417fc202c8097214c965f27 | |
const data = { | |
"debug": "on", | |
"window": { | |
"title": "Sample Konfabulator Widget", | |
"name": "main_window", | |
"width": 500, | |
"height": 500 | |
}, | |
"image": { | |
"src": "Images/Sun.png", | |
"name": "sun1", | |
"hOffset": 250, | |
"vOffset": 250, | |
"alignment": "center" | |
}, | |
"text": { | |
"data": "Click Here", | |
"size": 36, | |
"style": "bold", | |
"name": "text1", | |
"hOffset": 250, | |
"vOffset": 100, | |
"alignment": "center", | |
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" | |
} | |
}; | |
var result = []; | |
for (var key in data) { | |
for (var key2 in data[key]) { | |
if (typeof data[key][key2] == 'number') { | |
result.push(key2); | |
} | |
} | |
} | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment