What is the output?
Anonymous Quiz
30%
2024/01/15 12abc olleh
30%
15/01/2024 121abc hello
28%
15/01/2024 121abc olleh
12%
15/01/2024 abc121 olleh
👍2❤1
In the past few weeks, TanStack has been rapidly iterating on a new, framework-neutral way to declaratively specify a large number of chart-related visualizations in JavaScript. Output renders to SVG or canvas and can be styled as you wish. Here's a comparison against other established options.
TanStack
Please open Telegram to view this post
VIEW IN TELEGRAM
❤7👍2
CHALLENGE
class Money {
#amount;
constructor(amount) { this.#amount = amount; }
[Symbol.toPrimitive](hint) {
if (hint === 'number') return this.#amount;
if (hint === 'string') return `$${this.#amount}`;
return `Money(${this.#amount})`;
}
}
const m = new Money(42);
console.log(`${m}`, m + 8, m == 42);❤5🤩3
What is the output?
Anonymous Quiz
30%
$42 Money(42)8 false
19%
$42 508 true
29%
Money(42) Money(42)8 false
23%
$42 50 true
❤1🤩1
Landing just two days after 26.6, coverage reports can now include files your tests didn't touch with
--test-coverage-include-all, FFI and SQLite pick up crash fixes, and Perfetto tracing support lands, though you'll need a custom build to use it.Antoine du Hamel
Please open Telegram to view this post
VIEW IN TELEGRAM
❤4
CHALLENGE
const arr = [1, 2, 3, 4, 5];
arr[Symbol.iterator] = function* () {
for (let i = 0; i < 3; i++) yield arr[i] * 2;
};
console.log([...arr], JSON.stringify(arr));
❤1🔥1
What is the output?
Anonymous Quiz
21%
[ 1, 2, 3 ] [1,2,3,4,5]
41%
[ 2, 4, 6, 8, 10 ] [1,2,3,4,5]
17%
[ 2, 4, 6 ] [2,4,6,4,5]
21%
[ 2, 4, 6 ] [1,2,3,4,5]
🔥1
A Rust-powered library (with Node.js and WASM bindings) that converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF documents into Markdown. I tried it on a 1,600 page PDF and it took less than 2 seconds. There's also an in-browser demo to try it out. GitHub repo.
Firecrawl
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3❤2
CHALLENGE
function test() {
try {
console.log(y);
} catch (e) {
return e.constructor.name;
}
}
let result1 = test();
let y = 'hoisted';
console.log(result1, typeof y, y);🔥3
What is the output?
Anonymous Quiz
38%
ReferenceError string hoisted
31%
ReferenceError undefined hoisted
26%
undefined string hoisted
5%
TypeError string hoisted
🔥3❤1
Did you know JavaScript supports a third type of comment (beyond // and /* */)? 😉 Mat Marquis shows off hashbang comments in a short YouTube video. And yes, they're in the language spec!
Please open Telegram to view this post
VIEW IN TELEGRAM
🤔4🔥2❤1
CHALLENGE
const obj = { a: { b: null }, getVal: null };
let counter = 0;
function sideEffect() {
counter++;
return counter;
}
const result = obj?.a?.b?.[sideEffect()] ?? 'default1';
const result2 = obj.getVal?.(sideEffect()) ?? 'default2';
const result3 = obj?.a?.c?.d ?? sideEffect();
console.log(result, result2, result3, counter);What is the output?
Anonymous Quiz
30%
default1 default2 undefined 0
29%
1 2 1 1
29%
default1 default2 1 1
12%
default1 default2 default3 0
🔥3❤1