Andriy Fedin<p>Ternary operator is great, but it can be hard to remember for beginners.<br>Here’s a helpful mnemonic: WTF</p><p>expr0 ? expr1 : expr2 ➡️ What ? True : False</p><p>Thanks to <span class="h-card" translate="no"><a href="https://mastodon.social/@twostraws" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>twostraws</span></a></span> for mentioning @scottmichaud’s invention</p><p><a href="https://mastodon.social/tags/LearnInPublic" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LearnInPublic</span></a> <a href="https://mastodon.social/tags/Swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Swift</span></a></p>