--- title: 'You can refactor cluttered if () conditions using lookup tables, match statements, and switch statements' tweet_id: '1471864664661311488' thread_slug: weekly-thread-2022-01 author_username: archtechx images: - 'https://pbs.twimg.com/media/FGVrAKdVgAIWfwk.jpg' created_at: 2021-12-17T15:27:36+00:00 slug: you-can-refactor-cluttered-if-conditions-using-lookup-tables-match-statements-and-switch-statements --- 🔥 Three ways you can refactor cluttered if () conditions First: lookup tables 👇 These are great for refactoring complex conditions with lots of else if () cases