What is the output?
Anonymous Quiz
11%
['a', 'b', 'c', 'e']
52%
['a', 'bcd', 'e']
8%
['a', 'b', 'c', 'd']
29%
["a", "b", "c", "d", "e"]
π8π€©3π€1
Please open Telegram to view this post
VIEW IN TELEGRAM
β€3π1π₯1
CHALLENGE
const array = [1, 2, [3, 4, [5, 6]]];
const result = array.flat(2).map(n => n * 2);
console.log(result);
π₯5π4π€©1
What is the output?
Anonymous Quiz
15%
[2, 4, 3, 4, 5, 6]
22%
[1, 2, 6, 8, 10, 12]
49%
[2, 4, 6, 8, 10, 12]
14%
[2, 4, [6, 8, [10, 12]]]
π9π€£4β€2π₯1π€©1
This media is not supported in your browser
VIEW IN TELEGRAM
Soon, all websites will start using WebAI because the model will run on your computer, and they won't need to spend resources on it.
Narek Hakobyan
Please open Telegram to view this post
VIEW IN TELEGRAM
π20π€12π₯9β€4π€£4
CHALLENGE
const array = [1, 2, [3, 4, [5, 6]]];
const result = array.flat(2).map(n => n * 2);
console.log(result);
π3
π€£21π€14π9π₯4π€©1
A modern, configurable, and fast template engine promising βthe power of Nunjucksβ and βthe simplicity of EJSβ. Thereβs an online playground if you want to see it in action.
Ben Gubler
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€2π₯2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£71π₯5π2π€©2
CHALLENGE
const array = [1, 2, 3, 4, 5];
const [first, ...rest] = array;
const modified = rest.map((n, i) => i % 2 === 0 ? n * 2 : n);
console.log(first, modified);
β€9π4
What is the output?
Anonymous Quiz
23%
1, [2, 3, 8, 5]
18%
1, [4, 6, 8]
20%
1, [4, 8]
40%
1, [4, 3, 8, 5]
π9
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£108π9β€4π₯1
CHALLENGE
const obj = { a: 1, b: 2 };
const proxy = new Proxy(obj, {
get(target, prop) {
return prop in target ? target[prop] : 0;
}
});
console.log(proxy.a, proxy.b, proxy.c);
β€11π₯3π2
What is the output?
Anonymous Quiz
18%
undefined, 2, 0
21%
1, undefined, 0
40%
1, 2, 0
20%
1, 2, undefined
β€6
You can 'cancel' XHR and fetch requests, but can you cancel regular promises? Currently, no, but Zachary looks into doing the next best thing: telling a promise the game's up, and discarding/ignoring its eventual results.
Zachary Lee
Please open Telegram to view this post
VIEW IN TELEGRAM
π7
CHALLENGE
const array = [1, 2, 3];
array[10] = 4;
console.log(array.length);
console.log(array.includes(undefined));
π21π€12β€11π€£6
A slider control based visualization you can code with simple formulas. We last linked to this a few years ago, but itβs still a fun way to do some quick, visual JS math experimentation. Tixy.land is along similar lines, but based on a 2D grid.
blinry
Please open Telegram to view this post
VIEW IN TELEGRAM
β€8π4π₯1
CHALLENGE
const obj = {
a: 1,
b() {
return this.a;
}
};
const b = obj.b;
console.log(b.call({ a: 2 }));
π20β€5π€©2
π2
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯4β€3π€©3