What is the output?
Anonymous Quiz
32%
3000 undefined 5 localhost
33%
9999 injected 99 undefined
26%
3000 undefined 99 localhost
9%
3000 injected 5 undefined
β€9π€2π₯1
For the past few years I've been doing pwn challenges - starting from basic stack overflows, progressing through libc heap exploitation, writing a CheatEngine clone in Rust, and prototyping an eBPF-based record-replay tool that required bypassing vDSO. I felt fairly comfortable with systems programming and userspace exploitation.
But challenges like QEMU escape or browser exploitation always seemed like a different league. Something I wasn't "ready for yet." That feeling created an artificial barrier - I kept telling myself I needed more preparation before even attempting them.
....
D4RK7ET (Varik Matevosyan)
Please open Telegram to view this post
VIEW IN TELEGRAM
β€9π7π₯2
CHALLENGE
const memoize = (fn) => {
const cache = new Map();
return (...args) => {
const key = JSON.stringify(args);
if (cache.has(key)) {
return cache.get(key);
}
const result = fn(...args);
cache.set(key, result);
return result;
};
};
let callCount = 0;
const expensiveMultiply = memoize((a, b) => {
callCount++;
return a * b;
});
console.log(expensiveMultiply(3, 4));
console.log(expensiveMultiply(3, 4));
console.log(expensiveMultiply(2, 5));
console.log(expensiveMultiply(3, 4));
console.log(`calls: ${callCount}`);
β€6π₯4π2
What is the output?
Anonymous Quiz
28%
12 12 10 12 calls: 2
31%
12 undefined 10 12 calls: 3
24%
12 12 10 12 calls: 3
17%
12 12 10 12 calls: 4
π₯4β€1
CHALLENGE
const config = {
version: 1,
settings: { theme: "dark", fontSize: 14 },
tags: ["beta", "v1"],
};
Object.seal(config);
Object.freeze(config.settings);
config.version = 99;
config.newProp = "ignored";
delete config.tags;
config.settings.theme = "light";
config.settings.newKey = "ignored";
config.tags.push("v2");
config.tags[0] = "stable";
console.log(
config.version,
config.newProp,
config.settings.theme,
config.tags
);
π₯4π1
CHALLENGE
"use strict";
function createCounter() {
let count = 0;
return {
increment() { count++; },
get value() { return count; },
reset: function() { count = 0; }
};
}
const counter = createCounter();
counter.increment();
counter.increment();
counter.increment();
const { value, reset } = counter;
reset();
console.log(counter.value, value);
β€4π₯2
What is the output?
Anonymous Quiz
20%
3 3
40%
0 0
28%
0 3
12%
TypeError: Cannot read properties of undefined
π₯5π2
CHALLENGE
const delay = (val) => Promise.resolve(val);
async function pipeline(input) {
const result = await delay(input)
.then((v) => v * 2)
.then((v) => v + 10)
.then((v) => {
if (v > 20) throw new Error(`Too large: ${v}`);
return v;
})
.catch((e) => `Caught: ${e.message}`)
.then((v) => (typeof v === "string" ? v.toUpperCase() : v * 3));
return result;
}
Promise.all([pipeline(4), pipeline(8)]).then(([a, b]) => {
console.log(a);
console.log(b);
});
β€2π1
What is the output?
Anonymous Quiz
29%
54 CAUGHT: TOO LARGE: 26
29%
CAUGHT: TOO LARGE: 26 18
35%
18 CAUGHT: TOO LARGE: 26
7%
18 Caught: Too large: 26
π₯2β€1
The Temporal API, designed to modernize JavaScriptβs date/time handling, reached stage 4 last month. Node was waiting on V8 to make it enabled by default, which happened in V8 14.4, and the wheels are now in motion for an eventual release in Node 26.
Richard Lau
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7π7π₯1
CHALLENGE
const handler = {
get(target, prop, receiver) {
if (prop in target) {
return Reflect.get(target, prop, receiver) * 2;
}
return `${prop} not found`;
},
set(target, prop, value) {
if (typeof value !== "number") {
throw new TypeError("Only numbers allowed");
}
target[prop] = value + 10;
return true;
},
has(target, prop) {
return prop.startsWith("x") ? false : prop in target;
},
};
const obj = new Proxy({ score: 5, xp: 100 }, handler);
obj.level = 3;
console.log(obj.score);
console.log(obj.level);
console.log("xp" in obj);
console.log("score" in obj);
console.log(obj.rank);
β€2π1π₯1
What is the output?
Anonymous Quiz
30%
10 26 true false rank not found
41%
5 13 true true undefined
17%
10 13 false true rank not found
12%
10 26 false true rank not found
π₯2π1
Please open Telegram to view this post
VIEW IN TELEGRAM
β€10π5π₯3
CHALLENGE
const curry = (fn) => {
const arity = fn.length;
return function curried(...args) {
if (args.length >= arity) {
return fn(...args);
}
return (...moreArgs) => curried(...args, ...moreArgs);
};
};
const volume = (l, w, h) => l * w * h;
const curriedVolume = curry(volume);
const withLength5 = curriedVolume(5);
const withLength5Width3 = withLength5(3);
console.log(typeof withLength5);
console.log(typeof withLength5Width3);
console.log(withLength5Width3(2));
console.log(curriedVolume(4)(6)(2));π3π₯3β€1
What is the output?
Anonymous Quiz
25%
undefined function 15 48
53%
function function 30 48
15%
function function 30 24
7%
function number 30 48
β€4π3π₯2
CHALLENGE
function checkTDZ() {
console.log(typeof undeclaredVar);
try {
console.log(typeof letVar);
} catch (e) {
console.log(`Caught: ${e.constructor.name}`);
}
let letVar = "initialized";
const result = (() => {
let x = 10;
return function () {
let x = x + 5;
return x;
};
})();
try {
console.log(result());
} catch (e) {
console.log(`Caught: ${e.constructor.name}`);
}
}
checkTDZ();
β€1π1π₯1
CHALLENGE
const str = " Hello, World! ";
const result = str
.trim()
.split(", ")
.map((word, i) => {
return i === 0
? word.toUpperCase()
: word.replace(/!$/, "").split("").reverse().join("") + "?";
})
.join(" | ");
const [first, ...rest] = result.split(" | ");
const final = `${first} | ${rest.join(" & ")}`;
console.log(final);
β€1π₯1
What is the output?
Anonymous Quiz
31%
Hello | WORLD!
24%
HELLO | World?
37%
HELLO | dlroW?
8%
HELLO | dlroW!
π3β€2
CHALLENGE
const p1 = new Promise((resolve) => {
console.log("A");
resolve("B");
});
const p2 = p1.then((val) => {
console.log(val);
return "C";
});
p2.then((val) => {
console.log(val);
});
console.log("D");
π₯1