Define a Function to Set Common Behaviors in Operators

Share this video with your friends

Send Tweet

If you find yourself repeating a lot of the same code over and over, this might be an opportunity to write a utility function to capture the repetition and keep it tucked away in a single function. This lesson walks through writing a createOperator utility to capture the repetition of the "done" logic in each operator.