0% found this document useful (0 votes)
2 views2 pages

JS Day2 Worksheet With Answers

The document is a worksheet focused on JavaScript operators and control structures. It includes questions and answers about various JavaScript concepts such as arithmetic operations, logical operators, type checking, and conditional statements. The content is designed to test understanding of JavaScript fundamentals.

Uploaded by

thegoodman0220
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

JS Day2 Worksheet With Answers

The document is a worksheet focused on JavaScript operators and control structures. It includes questions and answers about various JavaScript concepts such as arithmetic operations, logical operators, type checking, and conditional statements. The content is designed to test understanding of JavaScript fundamentals.

Uploaded by

thegoodman0220
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

JavaScript Day 2: Operators & Control Structures - Worksheet

1) What will be the output of: console.log(5 + '5');

Answer: 55

2) Is 10 % 2 === 0? (true/false)

Answer: true

3) What is the result of: 10 > 5 && 3 < 1 ?

Answer: false

4) What does '===' check in JavaScript?

Answer: value and type

5) What is the output of: typeof false;

Answer: boolean

6) What is the result of (5 > 3) ? 'yes' : 'no';

Answer: yes

7) let x = 10; x += 5; What is x?

Answer: 15

8) If a = 4, b = 2, what is a * b + 3?

Answer: 11

9) If age = 17, what will this print? if (age >= 18) { console.log('Adult'); } else { console.log('Minor'); }

Answer: Minor

10) Which is the modulus operator?

Answer: %

11) Which is NOT a comparison operator?

Answer: +=

12) true && false returns?

Answer: false
13) Ternary operator syntax?

Answer: a ? b : c

You might also like