React & Front-end development blog

  • Home
  • Case Studies
  • Services
  • About
  • Career
  • Blog
  • Hire us
  • All
  • React JS
  • React Native
  • Jamstack
  • Product Development
  • Web Dev
  • Mobile Dev
  • Business

React TL;DR – a human filter for most useful React content.

All posts

6 Tips to Improve Your Conditional Statements for Better Readability

October 23, 2020
Avatar
Mariusz Marcak
  • array methods
  • conditional statement
  • functions
  • indexing
  1. Returning Early Instead of if…else
  2. Using Array.includes
  3. Using Default Function Parameters
  4. Using Array.every
  5. Using Array.some
  6. Using Indexing Instead of switch…case
Read the full article

You might be interested in:

  • Why your agency should use Gatsby?
  • How To Survive The First Days as a Business Developer
  • Open Kudos – A Free Slack Bot To Build Stronger Digital Teams

More posts by
Mariusz Marcak

  • Before You memo()
    Before You memo()

    Mariusz Marcak

  • Introducing Gatsby 3.0 – Faster in Every Way that Matters
    Introducing Gatsby 3.0 – Faster in Every Way that Matters

    Mariusz Marcak

  • React useRef By Example: What It Is, Why We Need It
    React useRef By Example: What It Is, Why We Need It

    Mariusz Marcak

  • Discovering Next.js with Guillermo Rauch
    Discovering Next.js with Guillermo Rauch

    Mariusz Marcak

  • 6 React Best Practices For 2021
    6 React Best Practices For 2021

    Mariusz Marcak

Recent posts from
Pagepro

  • Before You memo()
    Before You memo()

    Mariusz Marcak

  • Introducing Gatsby 3.0 – Faster in Every Way that Matters
    Introducing Gatsby 3.0 – Faster in Every Way that Matters

    Mariusz Marcak

  • React useRef By Example: What It Is, Why We Need It
    React useRef By Example: What It Is, Why We Need It

    Mariusz Marcak

  • Discovering Next.js with Guillermo Rauch
    Discovering Next.js with Guillermo Rauch

    Mariusz Marcak

  • 6 React Best Practices For 2021
    6 React Best Practices For 2021

    Mariusz Marcak

WE ARE AVAILABLE

FOR NEW PROJECTS.

TOP B2B COMPANIES, CLUTCH, POLAND 2018
contact us

About

  • What we do
  • Our work
  • About us
  • Career
  • Blog

Services

  • Web App Development
  • Mobile App Development
  • Team Augumentation
  • Trainings
  • Storefront Development
  • Front-end Development

Specialties

  • React Developers
  • React Native Developers
  • Node.JS Developers
  • Gatsby Developers
  • Next.JS Developers
  • JAMStack Development

Pagepro LTD

  • International House
    24 Holborn Viadut
    London EC1A 2BN

  • Privacy Policy
  • Cookies Policy
  • © All rights reserved. Pagepro Ltd.