forked from ccoenraets/react-trivia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.js
More file actions
157 lines (157 loc) · 5.55 KB
/
data.js
File metadata and controls
157 lines (157 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
var data = [
{
"category": "React 101",
"questions": [
{
"points": 100,
"question": "<p>What part of your application does React focus on?</p><ol><li>The Model</li><li>The View</li><li>The Controller</li><li>All of the above</li></ol>",
"answer": "B. The View"
},
{
"points": 150,
"question": "_____ lets you create JavaScript objects using HTML syntax",
"answer": "JSX"
},
{
"points": 200,
"question": "What tool can you use to transpile JSX?",
"answer": "Babel"
},
{
"points": 250,
"question": "React uses a _____________ to limit direct manipulation of the DOM and improve performance",
"answer": "Virtual DOM"
},
{
"points": 300,
"question": "React uses a _____________ to limit direct manipulation of the DOM and improve performance",
"answer": "Virtual DOM"
}
]
},
{
"category": "React 201",
"questions": [
{
"points": 100,
"question": "<p>Where can you define a component's initial state when you use the ES6 Class syntax?</p><ol><li>getInitialState()</li><li>getInitialProps()</li><li>The component's constructor</li></ol>",
"answer": "C. The component's constructor"
},
{
"points": 200,
"question": "Using npm, which package should you require/import in addition to 'react' to render a React component in an existing DOM element of your HTML file?",
"answer": "react-dom"
},
{
"points": 300,
"question": "<p>Which lifecycle function should you use to set default property values?</p><ol><li>getInitialState</li><li>getInitialProps</li><li>getDefaultProps</li></ol>",
"answer": "C. getDefaultProps"
},
{
"points": 400,
"question": "Which lifecycle method is invoked once, immediately after the initial rendering occurs?",
"answer": "componentDidMount"
}
]
},
{
"category": "ES 2015",
"questions": [
{
"points": 100,
"question": "<p>Constants (const) are:</p><ol><li>Block scoped</li><li>Function scoped</li><li>Global</li></ol>",
"answer": "A. Block scoped"
},
{
"points": 200,
"question": "Name 3 new collection classes in ES2015",
"answer": "<ul><li>Map</li><li>WeakMap</li><li>Set</li><li>WeakSet</li></ul>"
},
{
"points": 300,
"question": "<p>What's being logged and how is this new ES6 feature called?</p><code>var colors = ['red', 'blue', 'green'];<br/>var [primary, secondary, tertiary] = colors;<br/>console.log(secondary);</code>",
"answer": "<ul><li>blue</li><li>Array destructuring</li></ul>"
},
{
"points": 400,
"question": "<p>What's being logged and name 4 new features of ES6 used in this code snippet?</p><code>let greeting = (name, msg='Hello') => `${msg}, ${name}`;<br/>console.log(greeting('Christophe');</code>",
"answer": "<p>Hello, Christophe</p><ul><li>let variables</li><li>Arrow functions</li><li>Default parameters</li><li>Template strings</li></ul>"
}
]
},
{
"category": "Feeling Lucky",
"questions": [
{
"points": 100,
"question": "Using the proposed ECMAScript module syntax, how do you load the Mortgage.js module from the current directory and make all its members available in an object named mortgage?",
"answer": "<code>import * as mortgage from './Mortgage';</code>"
},
{
"points": 200,
"question": "What are the colors of the olympic rings?",
"answer": "<img src='assets/img/olympic_rings.png'/>"
},
{
"points": 300,
"question": "What's the date of the first React commit on GitHub?",
"answer": "May 26th, 2013"
},
{
"points": 400,
"question": "What's the hex color of the React logo?",
"answer": "#61DAFB"
}
]
},
{
"category": "Feeling Lucky",
"questions": [
{
"points": 100,
"question": "Using the proposed ECMAScript module syntax, how do you load the Mortgage.js module from the current directory and make all its members available in an object named mortgage?",
"answer": "<code>import * as mortgage from './Mortgage';</code>"
},
{
"points": 200,
"question": "What are the colors of the olympic rings?",
"answer": "<img src='assets/img/olympic_rings.png'/>"
},
{
"points": 300,
"question": "What's the date of the first React commit on GitHub?",
"answer": "May 26th, 2013"
},
{
"points": 400,
"question": "What's the hex color of the React logo?",
"answer": "#61DAFB"
}
]
},
{
"category": "Feeling Lucky",
"questions": [
{
"points": 100,
"question": "Using the proposed ECMAScript module syntax, how do you load the Mortgage.js module from the current directory and make all its members available in an object named mortgage?",
"answer": "<code>import * as mortgage from './Mortgage';</code>"
},
{
"points": 200,
"question": "What are the colors of the olympic rings?",
"answer": "<img src='assets/img/olympic_rings.png'/>"
},
{
"points": 300,
"question": "What's the date of the first React commit on GitHub?",
"answer": "May 26th, 2013"
},
{
"points": 400,
"question": "What's the hex color of the React logo?",
"answer": "#61DAFB"
}
]
}
];