Examveda
Examveda

A conditional expression is also called a

A. Alternate to if-else

B. Immediate if

C. If-then-else statement

D. None of the mentioned

Answer: Option B

Solution(By Examveda Team)

A conditional expression in JavaScript is also known as an immediate if or ternary operator. The correct answer is option B.

Let's understand the other options:
Option A, "Alternate to if-else," is not an accurate description of a conditional expression. While a conditional expression can be used as an alternative to if-else in certain cases, it is not its primary name.
Option C, "If-then-else statement," is not the commonly used term for a conditional expression. It is more commonly used to refer to the traditional if-else statement structure.
Option D, "None of the mentioned," is incorrect because a conditional expression does have a specific name.

Therefore, option B, "Immediate if," is the correct answer as it accurately describes the conditional expression in JavaScript. It is called "immediate" because it allows for a concise way of expressing a condition and immediately returning a value based on that condition.

This Question Belongs to Javascript >> Basic And Variables

Join The Discussion

Comments ( 1 )

  1. Deepak Dahal
    Deepak Dahal :
    2 years ago

    Right ans is If-then-else

Related Questions on Basic and Variables