Download - ES2015 Quiz
![Page 1: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/1.jpg)
ES6 KingInteractive fun quiz about new generation of JavaScript for your front end developers that will make them sweat and swear
![Page 2: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/2.jpg)
ES6 KingInteractive fun quiz about new generation of JavaScript for your front end developers that will make them sweat and swear
![Page 3: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/3.jpg)
ES6 KingES2015
Interactive fun quiz about new generation of JavaScript for your front end developers that will make them sweat and swear
![Page 4: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/4.jpg)
Rules4 teams
4 possible answers
1 minute per question
1 winner
The answer must be explained
12 questions
![Page 5: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/5.jpg)
Rules4 teams
4 possible answers
1 minute per question
1 winner
The answer must be explained
12 questions
![Page 6: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/6.jpg)
Rules4 teams
4 possible answers1 minute per question
1 winner
The answer must be explained
12 questions
![Page 7: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/7.jpg)
Rules4 teams
4 possible answers
1 minute per question
1 winner
The answer must be explained
12 questions
![Page 8: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/8.jpg)
Rules4 teams
4 possible answers
1 minute per question
1 winner
The answer must be explained
12 questions
![Page 9: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/9.jpg)
Rules4 teams
4 possible answers
1 minute per question
1 winner
The answer must be explained
12 questions
![Page 10: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/10.jpg)
Ready?Steady!Go!
![Page 11: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/11.jpg)
01
Question01
![Page 12: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/12.jpg)
let x = 42;
if (true) {
console.log(x);
let x = 1337;
}
What’s the result of the console.log operation?
1. 422. undefined3. Error4. 1337
![Page 13: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/13.jpg)
let x = 42;
if (true) {
console.log(x);
let x = 1337;
}
What’s the result of the console.log operation?
1. 422. undefined3. Error4. 1337
![Page 14: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/14.jpg)
01
Question02
![Page 15: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/15.jpg)
var x = `foo ${y}`,
y = `bar ${x}`;
console.log(y);
What’s the result of this code?
1. bar foo bar undefined
2. bar foo undefined
3. bar foo4. InternalError
![Page 16: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/16.jpg)
What’s the result of this code?
var x = `foo ${y}`,
y = `bar ${x}`;
console.log(y);
1. bar foo bar undefined
2. bar foo undefined
3. bar foo4. InternalError
![Page 17: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/17.jpg)
01
Question03
![Page 18: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/18.jpg)
What’s the result of this code?
1. 12. 33. [1,2,3]4. Error
((...x, xs)=>x)(1,2,3)
![Page 19: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/19.jpg)
What’s the result of this code?
((...x, xs)=>x)(1,2,3)
1. 12. 33. [1,2,3]4. Error
![Page 20: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/20.jpg)
01
Question04
![Page 21: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/21.jpg)
(new function f () {
this.a = 1;
return ((...b) => {
return this.a;
}).bind({ a: 9 });
})();
What’s the result of this code?
1. 92. undefined3. TypeError4. 1
![Page 22: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/22.jpg)
(new function f () {
this.a = 1;
return ((...b) => {
return this.a;
}).bind({ a: 9 });
})();
What’s the result of this code?
1. 92. undefined3. TypeError4. 1
![Page 23: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/23.jpg)
01
Question05
![Page 24: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/24.jpg)
let x, { x: y = 1 } = { x }; y;
What’s the result of this code?
1. undefined2. 1 3. {x: 1}4. Error
![Page 25: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/25.jpg)
What’s the result of this code?
let x, { x: y = 1 } = { x }; y;
1. undefined2. 1 3. {x: 1}4. Error
![Page 26: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/26.jpg)
01
Question06
![Page 27: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/27.jpg)
typeof (function* f() {
yield f;
})().next()
What’s the result of this code?
1. “function”2. “generator”3. “object”4. Error
![Page 28: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/28.jpg)
typeof (function* f() {
yield f;
})().next()
What’s the result of this code?
1. “function”2. “generator”3. “object”4. Error
![Page 29: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/29.jpg)
01
Question07
![Page 30: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/30.jpg)
class MyClass {
const MY_CONST = 'string';
constructor() {
this.MY_CONST;
}
}
let myClass = new MyClass();
console.log(myClass.MY_CONST);
What’s the result of this code?
1. ‘string’2. SyntaxError3. undefined4. ReferenceError
![Page 31: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/31.jpg)
class MyClass {
const MY_CONST = 'string';
constructor() {
this.MY_CONST;
}
}
let myClass = new MyClass();
console.log(myClass.MY_CONST);
What’s the result of this code?
1. ‘string’2. SyntaxError3. undefined4. ReferenceError
![Page 32: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/32.jpg)
01
Question08
![Page 33: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/33.jpg)
function* g() {
return 1;
}
for (let i of g())
console.log(i);
What’s the result of this code?
1. 12. Error3. undefined4. [object Object]
![Page 34: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/34.jpg)
function* g() {
return 1;
}
for (let i of g())
console.log(i);
What’s the result of this code?
1. 12. Error3. undefined4. [object Object]
![Page 35: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/35.jpg)
01
Question09
![Page 36: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/36.jpg)
let popo = (function*() {
console.log([yield, yield]);
}());
popo.next(1);
popo.next(2);
popo.next(3);
What’s the result of this code?
1. [1,2]2. [2,3]3. [1,undefined]4. Error
![Page 37: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/37.jpg)
let popo = (function*() {
console.log([yield, yield]);
}());
popo.next(1);
popo.next(2);
popo.next(3);
What’s the result of this code?
1. [1,2]2. [2,3]3. [1,undefined]4. Error
![Page 38: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/38.jpg)
01
Question10
![Page 39: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/39.jpg)
What’s the result of this code?
1. f, f, f2. f, t, f3. f, t, t4. t, t, t
class X {}
class Y extends X {}
console.log(Object.getPrototypeOf(X) ===
Function.prototype);
console.log(Object.getPrototypeOf(Y) === X);
console.log(Object.getPrototypeOf(new Y()) ===
Y.prototype)
![Page 40: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/40.jpg)
What’s the result of this code?
1. f, f, f2. f, t, f3. f, t, t4. t, t, t
class X {}
class Y extends X {}
console.log(Object.getPrototypeOf(X) ===
Function.prototype);
console.log(Object.getPrototypeOf(Y) === X);
console.log(Object.getPrototypeOf(new Y()) ===
Y.prototype)
![Page 41: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/41.jpg)
01
Question11
![Page 42: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/42.jpg)
What’s the result of this code?
1. []2. [2,3,4,5,1]3. [5,4,3,2,1]4. Error
let f = (x, ...y) => x?[...f(...y), x]:[];
let arr = [], i = 0;
for (arr[i++] of f(1,2,3,4,5)) {}
console.log(arr);
![Page 43: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/43.jpg)
What’s the result of this code?
1. []2. [2,3,4,5,1]3. [5,4,3,2,1]4. Error
let f = (x, ...y) => x?[...f(...y), x]:[];
let arr = [], i = 0;
for (arr[i++] of f(1,2,3,4,5)) {}
console.log(arr);
![Page 44: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/44.jpg)
01
Question12
![Page 45: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/45.jpg)
What’s the result of this code?
1. [1,2]2. 33. 44. 5 let m = new Map([[1,2],[[1,2],3],[2,4],[3,5]]);
console.log(m.get([...m][1][1]));
![Page 46: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/46.jpg)
What’s the result of this code?
1. [1,2]2. 33. 44. 5 let m = new Map([[1,2],[[1,2],3],[2,4],[3,5]]);
console.log(m.get([...m][1][1]));
![Page 47: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/47.jpg)
And the winner is...
![Page 48: ES2015 Quiz](https://reader030.vdocuments.mx/reader030/viewer/2022021421/58ecd74a1a28abda7d8b4661/html5/thumbnails/48.jpg)
Thank Youcredits:
● Afonso Matos● Juriy Zaytsev● Dmitry Soshnikov
● Kim Gysen● Ben Katz● Sergey Bolshchikov