Code refactor by using ternary operator instead of if..else..if statement in swift

if..else..if statement with else statement returning void
replacing if..else..if statement with ternary operator

--

--

--

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

Love podcasts or audiobooks? Learn on the go with our new app.

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
Akarsh SEGGEMU

Akarsh SEGGEMU

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

More from Medium

Improve your architecture by abstract your code

Tuist Your Circle — Building A Project Faster With CircleCI — Part 2

Creating Objects without Specifying their Concrete Classes

Should we write unit tests for network classes?