TGViewer
JavaScript test JavaScript test @js_test · 9.67K subscribers
Post #4583 881
❓Что будет на выходе?

function trickyFunction() {
let a = 5;
let b = '5';
let c = 5;

if (a == b && b === c) {
console.log('Condition 1');
} else if (a === c || b == c) {
console.log('Condition 2');
} else {
console.log('Condition 3');
}
}

trickyFunction();


Ответ:
Condition 2


JavaScript test | #JavaScript
More from @js_test
  1. Oct 18, 2026❗️Что будет на выходе: function* generator1() { yield 1; yield 2; } function* generator2()…
  2. Oct 18, 2026❗️Что будет на выходе: function highlight(strings, ...values) { return strings.reduce((res…
  3. Oct 18, 2026❗️Что будет на выходе: const obj = { x: 10, foo() { setTimeout(function() { console.log(th…
  4. Oct 17, 2026❗️Что будет на выходе: function task1() { console.log('A'); setTimeout(() => console.log('…
  5. Oct 17, 2026❗️Что будет на выходе: function greet(name) { return `Hello, ${name}!`; } function highlig…
  6. Oct 17, 2026❗️Что будет на выходе: const counter = (function () { let count = 0; const history = []; r…
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 →