DEV Community

Discussion on: βœ”||🀒 Commit or Vomit | nested ternary operator

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

You know it's called the conditional operator, right? It just happens to be a ternary operator (one that takes 3 operands)

Collapse
 
jonrandy profile image
Jon Randy πŸŽ–οΈ

Yes, I'm a hoot at parties! πŸ˜‹

Collapse
 
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager

Don't forget to vote on your way out πŸ˜‰

Collapse
 
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager

I just love it when I make mistakes ☺️ means I've learned something 😎

Collapse
 
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager

Hah good one, thanks

Collapse
 
andreidascalu profile image
Andrei Dascalu

Hmm, in all languages I know this is the only conditional operator though the common way to name it depends. In Java it's generally the conditional operator while in PHP it's commonly the ternary operator.
But I am really curious, do you know a language where there is another kind of conditional operator that is not a ternary?