Freshers Aptitude technical questions
Freshers Job Alert
Bookmark and Share

•  Conditional Operator in JavaScript

 

JavaScript also contains a conditional operator that assigns a value to a variable based on some condition.

Syntax

variablename=(condition)?value1:value2