TGViewer
JavaScript test JavaScript test @js_test · 9.68K subscribers
Post #5064 672
❗️Что будет на выходе:

console.log(1);

setTimeout(() => {
console.log(2);
Promise.resolve().then(() => console.log(3));
}, 0);

Promise.resolve()
.then(() => {
console.log(4);
setTimeout(() => console.log(5), 0);
})
.then(() => console.log(6));

console.log(7);


Ответ: 1, 7, 4, 6, 2, 3, 5

JavaScript test | #JavaScript
More from @js_test
  1. Oct 15, 2026❗️Что будет на выходе: try { try { // Creating a custom error type class CustomError exten…
  2. Oct 15, 2026❗️Что будет на выходе: const createMathOps = (base) => { return { add: (x) => base + x, mu…
  3. Oct 15, 2026❗️Что будет на выходе: const team = { name: 'Eagles', players: ['Smith', 'Johnson', 'Willi…
  4. Oct 14, 2026❗️Что будет на выходе: function processData({ a = 10, b = 20 } = { a: 30 }) { console.log(…
  5. Oct 14, 2026Как платить за границей и за зарубежные сервисы в 2026 году? Можно переплачивать посредник…
  6. Oct 14, 2026❗️Что будет на выходе: const person = { name: 'Alice', greet() { return `Hello, I'm ${this…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →