Question 1
What will be the output of the following code?
<script>
let result = 0;
for (let i = 0; i < 5; i++) {
result += i;
}
document.write(result);
</script>
Question 3
Question 4
<script>
if (5) {
document.write(\"I like peanuts\");
}
</script>
Question 5
<script>
let bar = 1;
foo = {};
foo: {
bar : 2;
baz : ++bar;
};
document.write(foo.baz + foo.bar + bar);
</script>
Question 6
What will be the output of the following code?
< script>
document.write( 10 > 9 > 8 === true );
</ script>
Question 7
<script>
document.write(String(\'Hello\') == \'Hello\');
</script>
Question 8
<script>
document.write(( true + false ) > 2 + true );
</script>
Question 9
<script>
document.write(Number(\'1\') - 1 == 0);
</script>
Question 10
<script>
document.write(NaN == NaN);
</script>
There are 10 questions to complete.