Create an ifElse Operator to Fork on a Condition

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

So far, we've used filter to prevent values when a condition is met. Sometimes you want two different behaviors based on a condition which is where you would naturally reach for an if and an else. Let's take a look at what an ifElse operator would look like in the context of our live search box.