menu

JavaScript Operators

JavaScript Operators - Important Points


16. What is the result of true && false in JavaScript?

A. 1

B. 0

C. 1

D. 0

Discuss Work Space

Answer: option b

Explanation:

The && operator is the logical AND operator. It returns true if both of its operands are true.

17. What is the result of !true in JavaScript?

A. 1

B. 0

C. 1

D. 0

Discuss Work Space

Answer: option b

Explanation:

The ! operator is the logical NOT operator. It negates its operand, so !true is false.

18. What is the result of typeof 42 in JavaScript?

A. number

B. string

C. boolean

D. undefined

Discuss Work Space

Answer: option a

Explanation:

The typeof 42 operator returns a number indicating the data type of its operand.

19. What is the result of typeof "hello" in JavaScript?

A. number

B. string

C. boolean

D. undefined

Discuss Work Space

Answer: option b

Explanation:

The typeof operator returns a string indicating the data type of its operand.

20. What is the result of typeof true in JavaScript?

A. number

B. string

C. boolean

D. undefined

Discuss Work Space

Answer: option c

Explanation:

The typeof true operator returns a boolean indicating the data type of its operand.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now