menu

JavaScript Operators

JavaScript Operators - Important Points


31. What is the result of ++i when i is 3 in JavaScript?

A. 2

B. 3

C. 4

D. undefined

Discuss Work Space

Answer: option c

Explanation:

The ++ operator is the increment operator. It adds 1 to its operand and returns the new value.

32. What is the result of i++ when i is 3 in JavaScript?

A. 2

B. 3

C. 4

D. undefined

Discuss Work Space

Answer: option b

Explanation:

The ++ operator is the increment operator. It adds 1 to its operand and returns the old value.

33. What is the result of --i when i is 3 in JavaScript?

A. 2

B. 3

C. 4

D. undefined

Discuss Work Space

Answer: option a

Explanation:

The -- operator is the decrement operator. It subtracts 1 from its operand and returns the new value.

34. What is the result of i-- when i is 3 in JavaScript?

A. 2

B. 3

C. 4

D. undefined

Discuss Work Space

Answer: option b

Explanation:

The -- operator is the decrement operator. It subtracts 1 from its operand and returns the old value.

35. What is the result of (true && false) in JavaScript?

A. 1

B. 0

C. null

D. undefined

Discuss Work Space

Answer: option b

Explanation:

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


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