Question 11
EasyWhat is the output of this program?
console.log(1 == , === );
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Programming Languages
What is the output of this program?
console.log(1 == , === );
true false
false true
false false
true true
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
let a = [1, 2, 3];
a.push(4);
console.log(a.length);
5
4
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
console.log([1, 2, 3].map(x => x * 2).join(","));
2,4,6,
246
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
console.log(typeof undefined, typeof "text");
null string
undefined undefined
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
console.log(Math.round(2.5), Math.floor(-2.5));
2 -2
3 -3
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
let s = "hello";
console.log(s.toUpperCase());
HELLO
hello world
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
console.log([3, 1, 2].sort().join(""));
123
321
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
const o = { a: 1, b: 2 };
console.log(Object.keys(o).length);
3
1
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
console.log(Boolean(""));
""
true
undefined
false
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
let x;
console.log(x);
undefined
0
null
Error
Sign up free to see the answer and a step-by-step explanation.
1234
3
1,2,3
2,4,6
undefined string
object string
3 -2
2 -3
H
undefined
312
1,2,3
undefined
2