CodeX
Published in

CodeX

Replacing Ternary Operators With the Elvis Operator

Because Elvis is the king of rock and roll

In computer programming, if statements are among the most used control statements. They are found in virtually every programming language, and it’s not too uncommon to end up nesting them in one way or another.

$elvis = true;
$ballad = true;

Everything connected with Tech & Code. Follow to join our 900K+ monthly readers

Recommended from Medium

The Path Towards Enterprise Level AWS Infrastructure — Load Balancing and Application Deployment

Latest Updates on Google Data Analytics (March 2022)

Customize your Revuto Wallet Address with ADA Handle

How to automatically extract EXIF metadata from photos in Airtable without code

Newsletter, 7th of September

Jenkins Installation on Redhat

Basic Intro to classes in Unity

Tips and tricks on http(s) session recording

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jordi Bassaganas

Jordi Bassaganas

Web developer and technical writer. Founder at ChesslabLab https://github.com/chesslablab

More from Medium

Nobody Should Be Using Rubber Duck Debugging in 2022

What the f*** is clean code?

Windows Development is in trouble

10 Things I Stole from Programmers Far Better than Me