How to use ternary operator within the map() function - JavaScript
The ternary operator in JavaScript is a conditional operator. It is used as an alternative to if...else statement. But do you know you can use the ternary operator within the .map() function. Yes you can and I'll show you how.