Conditional Operator in JavaScript

Conditional operator in JavaScript provides a one line approach for creating a simple conditional statement. It is often used as a shorthand method for if-else statement. It makes the code much more simple, shorter and readable. The conditional operator (?:)…

