Smartial Wayback Machine Text Extractor



Live version of this page exists.


This article contains 4 images. You will find them at the very end of the article.

This article contains 581 words.

Web Directions Global Scope '21 session spotlight–Rethinking the JavaScript ternary operator - Web Directions

Web Directions Global Scope ’21 session spotlight–Rethinking the JavaScript ternary operator

16th June, 2021

@johnallsopp

Rethinking the JavaScript ternary operator

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

James (@jrsinclair) is a Senior Developer with Atlassian. He works with JavaScript (in various flavours) on both the front and back-end. He’s passionate about functional programming, and good software-engineering practice in general. Over the years he’s worked on web projects for Ford Motor Company, Bendigo Bank, The Australian Broadcasting Corporation, Monash University, and the Prime Minister of Australia. Somewhere along the way he picked up a PhD in Information Architecture but decided building stuff on the web was more fun than being an academic.

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.

Learn more and register now

Across the year we have 4 remaining conferences (Hover our CSS conference took place in April and Lazy Load focussed on performance in June), focussing on JavaScript, Progressive Web Apps, Accessibility, and Security, privacy and identity.

Priced individually from $145, or attend all 6, plus get access to our conference presentation platform Conffab for just $595, or $59 a month.

Great reading, every weekend.

We round up the best writing about the web and send it your way each Friday morning.

delivering year round learning for front end and full stack professionals

Learn more about us

I’ve been admiring the Web Directions events for years, and was honored to be part… What a fantastic event!

Ethan Marcotte Inventor of 'Responsive Web Design'

    We've 6 specialised front end focussed conferences lined up for 2021. Featuring unique content, leading experts, and they'll help you keep up with our ever changing industry. Attend one, or all at an amazing price.

    The conference CSS deserves

    Online, globallyApril 23 & 30, 2021 2021

    Learn More

    a conference on front end performance

    Online, globallyJune 11 & 18 2021

    Learn More

    a conference all about JavaScript

    Online, globallyJuly 23 & 30 2021

    Learn More

    a conference on progressive web apps and web platform

    Online, globallySept 17 & 24 2021

    Learn More

    accessibility engineering for front end developers

    Online, globallyLate 2021

    Learn More

    privacy, security, identity for front end developers

    Online, globallyLate 2021

    Learn More



Images:

The images are downsized due to limited space here. The original dimensions may differ.
Click on the image to open it on a new tab.



Please close this window manually.