CHALLENGE
const s = "JavaScript";
const str = new String(s);
console.log(str === s, str == s, typeof str, str.at(-1), s.at(-1));
❤2
What is the output?
Anonymous Quiz
30%
false true string t t
28%
true true string t t
28%
false true object t t
13%
false false object t t
Still in alpha since last year, one of Leaflet's contributors has forked it, rolling in the 2.0 work plus rotation, fullscreen, search, heatmaps and more – all tree-shakeable.
Simon Legner
Please open Telegram to view this post
VIEW IN TELEGRAM
❤1🔥1
CHALLENGE
const a = [] + [];
const b = [] + {};
const c = {} + [];
const d = 1 + "1" - 1;
const e = "5" - "2" + "3";
const f = [1, 2] == "1,2";
console.log(a, b, c, d, e, f);
🔥1🤩1
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3❤2🔥1🤣1
CHALLENGE
const base = { greet() { return 'hi'; } };
const obj = Object.create(base, {
x: { value: 1, enumerable: true },
y: { value: 2, enumerable: false }
});
const spread = { ...obj };
const assigned = Object.assign({}, obj);
console.log(
spread.x,
spread.y,
spread.greet,
assigned.y,
Object.keys(spread).length
);What is the output?
Anonymous Quiz
25%
1 2 hi 2 2
25%
1 undefined hi 2 1
33%
1 undefined undefined undefined 1
17%
1 2 undefined undefined 1