What is the output?
Anonymous Quiz
12%
2 false name
63%
3 true greet
20%
2 true age
5%
3 false greet
β€6π₯2
CHALLENGE
const user = {
name: 'Sarah',
profile: {
settings: {
theme: 'dark'
}
}
};
const config = {
name: 'John',
profile: null
};
console.log(user.profile?.settings?.theme);
console.log(config.profile?.settings?.theme);
console.log(user.profile?.preferences?.language);
console.log(config.profile?.settings?.theme ?? 'light');π5π₯3β€1
What is the output?
Anonymous Quiz
19%
dark undefined null light
31%
dark null undefined light
45%
dark undefined undefined light
6%
Sarah undefined undefined light
β€2π2
CHALLENGE
function testScope() {
var x = 'outer';
let y = 'outer';
if (true) {
var x = 'inner';
let y = 'inner';
console.log(x, y);
}
console.log(x, y);
}
testScope();π5β€4π₯2π€£2
What is the output?
Anonymous Quiz
30%
inner inner outer outer
46%
inner inner inner outer
14%
inner inner inner inner
9%
outer outer inner inner
π8β€4
A 100% Prettier-compatible JavaScript code formatter (and sister project of Oxlint) that boasts being 30x faster than Prettier and 3x faster than Biome. Since the alpha, it now supports embedded language formatting (JSX, YAML, HTML, etc), Tailwind CSS class sorting, import sorting, and more.
Boshen, Dunqing, and Sugiura (VoidZero)
Please open Telegram to view this post
VIEW IN TELEGRAM
π6β€1π₯1
CHALLENGE
class Vehicle {
constructor(type) {
this.type = type;
}
describe() {
return `I am a ${this.type}`;
}
}
class Car extends Vehicle {
constructor(brand) {
super("car");
this.brand = brand;
}
describe() {
return `${super.describe()} made by ${this.brand}`;
}
}
const myCar = new Car("Toyota");
console.log(myCar.describe());
console.log(myCar instanceof Car);
console.log(myCar instanceof Vehicle);
console.log(Object.getPrototypeOf(Car) === Vehicle);
π5π₯5β€1
Christoph (of Jest fame) covers his preferred tools for getting your JavaScript tool stack running as fast as possible. Itβs also intended for LLMs to process via this Markdown version.
Christoph Nakazawa
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯6β€5π3
CHALLENGE
const compose = (...fns) => (x) => fns.reduceRight((acc, fn) => fn(acc), x);
const pipe = (...fns) => (x) => fns.reduce((acc, fn) => fn(acc), x);
const double = (x) => x * 2;
const addTen = (x) => x + 10;
const square = (x) => x * x;
const negate = (x) => -x;
const transform1 = compose(negate, square, addTen, double);
const transform2 = pipe(double, addTen, square, negate);
const input = 3;
console.log(transform1(input));
console.log(transform2(input));
console.log(transform1(input) === transform2(input));
π6β€3π₯1
What is the output?
Anonymous Quiz
17%
-256 -256 false
55%
-256 -256 true
20%
-256 -36 false
8%
-36 -256 false
β€4π2
A big step forward for a project thatβs almost 15 years old, and one of few stable, trusty options for rendering ultra-high resolution images for users to zoom into and pan around. Version 6 introduces a new async and cache-managed pipeline, making it far more efficient at scale.
OpenSeadragon Contributors
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯5β€4π3π€©1
CHALLENGE
class Session {
#id;
constructor(id) {
this.#id = id;
}
getId() { return this.#id; }
}
const activeSessions = new WeakSet();
const s1 = new Session("user_42");
const s2 = new Session("user_99");
let s3 = new Session("user_07");
activeSessions.add(s1);
activeSessions.add(s2);
activeSessions.add(s3);
console.log(activeSessions.has(s1)); // line A
console.log(activeSessions.has(s3)); // line B
s3 = null;
console.log(activeSessions.has(s3)); // line C
activeSessions.delete(s2);
console.log(activeSessions.has(s2)); // line D
console.log(activeSessions.size); // line E
β€7π2π₯1
What is the output?
Anonymous Quiz
21%
true true false false 0
47%
true true false false undefined
25%
true true true false undefined
6%
true true false true undefined
π11β€2π₯2
Render Mermaid diagram markup to SVG or ASCII/Unicode outputs (above) from JavaScript.
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯9β€7π2
CHALLENGE
const inventory = {
apples: 5,
bananas: 0,
cherries: 12,
dates: undefined,
elderberries: null,
};
const summary = Object.entries(inventory)
.filter(([_, value]) => value)
.reduce((acc, [key, value]) => {
acc[key] = value * 2;
return acc;
}, {});
console.log(Object.keys(summary).length);
console.log(Object.values(summary).every(v => v > 10));
console.log(Object.keys(inventory).length === Object.keys(summary).length);
π₯3β€1π1
What is the output?
Anonymous Quiz
24%
3 true false
41%
2 false false
21%
2 true false
14%
3 false false
β€5π1π€©1
Please open Telegram to view this post
VIEW IN TELEGRAM
π9π₯6β€2
CHALLENGE
const user = {
profile: {
getName: () => "Marcus",
getAge: () => 30,
},
settings: null,
};
const name = user.profile?.getName?.();
const age = user.profile?.getAge?.();
const theme = user.settings?.getTheme?.() ?? "dark";
const lang = user.address?.getLocale?.() ?? "en-US";
console.log(`${name} | ${age} | ${theme} | ${lang}`);
β€6π3
What is the output?
Anonymous Quiz
21%
Marcus | 30 | undefined | en-US
29%
Marcus | 30 | null | en-US
42%
Marcus | 30 | dark | en-US
8%
undefined | undefined | dark | en-US
β€3π3π₯2