What is the output?
Anonymous Quiz
26%
k0,k1,k2 0 1 2
27%
k0,k1,k2 1 1 1
31%
k1,k2,k3 1 2 3
16%
k0,k1,k2 1 2 3
❤6
CHALLENGE
const a = 5 & 3;
const b = 5 | 2;
const c = ~5;
const d = 1 << 31;
const e = -1 >>> 28;
const f = 5 ^ 5;
console.log(a, b, c, d, e, f);
What is the output?
Anonymous Quiz
21%
1 7 -6 2147483648 15 0
37%
1 7 -6 -2147483648 15 5
32%
1 7 -6 -2147483648 15 0
11%
1 7 -5 -2147483648 15 0
❤3🤔3
CHALLENGE
'use strict';
function getValue() {
return this.value;
}
const obj = { value: 42, getValue };
const fn = obj.getValue;
try {
fn();
} catch (err) {
console.log(err.constructor.name, typeof this);
}
❤2
What is the output?
Anonymous Quiz
30%
ReferenceError undefined
24%
TypeError undefined
29%
undefined undefined
16%
TypeError object
❤3
CHALLENGE
console.log(
typeof typeof 1,
1 + typeof 1,
2 ** 3 ** 2,
1 + 2 + '3',
1 < 2 < 3,
3 > 2 > 1
);