JavaScript NotesRohit’s interview study guide
Try it

Playground

Write or paste any JavaScript and press Run (or ⌘↩). It runs in your browser, offline too, and prints the way Node does. What you type stays on this device. Every example in the chapters has the same Run and Edit buttons.

playground.js
// Your playground: write or paste any JavaScript, then press Run (or ⌘↩).
// It runs in your browser and prints the way Node does. What you type is kept on this device.
const nums = [3, 1, 2];
console.log(nums.toSorted((a, b) => a - b), nums);

const user = { name: "Rohit", skills: ["JS", "TS"], address: { city: "Pune" } };
console.log(user);

setTimeout(() => console.log("3. a timer (macrotask)"), 0);
Promise.resolve().then(() => console.log("2. a promise callback (microtask)"));
console.log("1. plain code first");

Browser only: Node’s own modules (fs, http, process) aren’t here. An endless loop is stopped after 30 seconds, or press Stop.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.