• Post author:
  • Post category:Blog
  • Reading time:1 mins read
  • Post last modified:June 12, 2024

Which of the following operators is a ternary one?

  • An assignment operator =.
  • conditional operator ? :.
  • typeof operator.
  • An increment operator ++.
Explanation & Hint:

The ternary operator in JavaScript is represented by the ? and : symbols. It is the only ternary operator in JavaScript. The ternary operator takes the following form: condition ? expression1 : expression2 It evaluates the condition and returns expression1 if the condition is truthy, or expression2 if the condition is falsy.

For more Questions and Answers:

JavaScipt Essentials 1 (JSE) | JSE1 – Module 4 Test Exam Answers Full 100%

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments