wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Logical Operator

Total questions: 9

Worksheet time: 9mins

Name
Class
Date
1.

Give the output of the following snippet

<script>

var x= 100;

var y = 50

var y= x<12 && y>=50;

document.write(y);

</script>

a)

True

b)

False

2.

Give the output of the following snippet

<script>

var x= 100;

var y = 50

var y= x<12 || y>=50;

document.write(y);

</script>

a)

True

b)

False

3.

Give the output of the following snippet

<script>

var x= 100;

var y = 50

var z= !(x<12 || y>=50)

document.write(z);

</script>

a)

False

b)

True

4.

Give the output of the following snippet

<script>

var x= (10 == "10") && (20>18)

document.write(x)

</script>

a)

True

b)

False

5.

Give the output of the following snippet

<script>

var x= (10 === "10") && (20>18)

document.write(x)

</script>

a)

True

b)

False

6.

Give the output of the following snippet

<script>

var age = 3;

document.write(age > 3 && age<=5 )

</script>

a)

True

b)

False

7.

Give the output of the following snippet

<script>

var code=17;

document.write(code>5 || code<=15)

</script>

a)

True

b)

False

8.

Give the output of the following snippet

<script>

var x=3,y=5,z=3;

document.write( x!=y&&y!=z&&x!=z);

</script>

a)

True

b)

False

9.

Give the output of the following snippet

<script>

var x=3,y=5,z=3;

document.write( x!=y && y!=z || x!=z);

</script>

a)

True

b)

False