Font size
WorksheetsJavaScript 2
Total questions: 17
Worksheet time: 9mins
What will be the output?
console.log(1 == '1');
true
false
What will be the output?
console.log(1 === '1');
true
false
What will be the output?
console.log(1 == '01');
true
false
What will be the output?
console.log(10 > '9');
true
false
What will be the output?
console.log('8' + 7);
15
87
some error
What will be the output?
console.log(8 + '7');
15
87
some error
What will be the output?
console.log(10 / 0);
some error
Infinity
0
What will be the output?
console.log(10 / Infinity);
some error
0
Infinity
NaN
What will be the output?
console.log(Infinity / Infinity);
some error
0
NaN
Infinity
What will be the output?
console.log(0 == false);
true
false
What will be the output?
console.log('' == false); //there is an empty string on the statement
true
false
What will be the output?
console.log('' == 0); //there is an empty string on the statement
true
false
What will be the output?
console.log(undefined == null);
true
false
What will be the output?
console.log(NaN == NaN);
true
false
What will be the output?
let number = 0;
console.log(number++);
console.log(++number);
console.log(number);
1
2
2
0
2
2
0
1
2
What will be the output?
const obj = { a: 'one', b: 'two', a: 'three' };
console.log(obj);
some error
{ a: 'three', b: 'two'}
{ a: 'one', b: 'two', a: 'three' }
Select the falsy values!
(more than one correct answer is possible)
''
'1'
0
null
true
