James Sinclair, Senior Developer Atlassian
Lots of people treat the ternary operator with suspicion. At first glance, ternaries appear unnecessary. Nothing more than a tool for the overly-clever to trim some characters from their code; a favourite hack for coders who don’t care about readability. And sure, it’s all too easy to turn ternaries into an indecipherable mess. But what if we’re missing something? What if there’s more to ternaries than meets the eye?
We’ll take a deep look at what makes a ternary different from an if-statement. And we’ll explore ways to write safer conditionals. Finally, we’ll examine the do-expression TC39 proposal and explore how it might help the situation.
About James Sinclair
In 2021 we have a whole series of events for Front End Developers
Across 2021 Web Directions is presenting a series of online conferences for front end designers and developers. Focussed deep dives, they go far beyond what you might expect from conference programs.
Priced individually from $145, or attend all 6, plus get access to our conference presentation platform Conffab for just $595, or $59 a month.