Skip to content

Instantly share code, notes, and snippets.

@kimtree
Created January 25, 2019 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimtree/9632d53f932371dd538d7c3916104f66 to your computer and use it in GitHub Desktop.
Save kimtree/9632d53f932371dd538d7c3916104f66 to your computer and use it in GitHub Desktop.
LINE 2019 FrontEnd Quiz
// 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