WorksheetsLogical Operator
Total questions: 9
Worksheet time: 9mins
Give the output of the following snippet
<script>
var x= 100;
var y = 50
var y= x<12 && y>=50;
document.write(y);
</script>
True
False
Give the output of the following snippet
<script>
var x= 100;
var y = 50
var y= x<12 || y>=50;
document.write(y);
</script>
True
False
Give the output of the following snippet
<script>
var x= 100;
var y = 50
var z= !(x<12 || y>=50)
document.write(z);
</script>
False
True
Give the output of the following snippet
<script>
var x= (10 == "10") && (20>18)
document.write(x)
</script>
True
False
Give the output of the following snippet
<script>
var x= (10 === "10") && (20>18)
document.write(x)
</script>
True
False
Give the output of the following snippet
<script>
var age = 3;
document.write(age > 3 && age<=5 )
</script>
True
False
Give the output of the following snippet
<script>
var code=17;
document.write(code>5 || code<=15)
</script>
True
False
Give the output of the following snippet
<script>
var x=3,y=5,z=3;
document.write( x!=y&&y!=z&&x!=z);
</script>
True
False
Give the output of the following snippet
<script>
var x=3,y=5,z=3;
document.write( x!=y && y!=z || x!=z);
</script>
True
False
