I stumbled on this difficulty when refactoring a operate to return an object in place of an array, but I forgot to update the return value inside the if statement. J0HNJ0HN 27k55 gold badges5858 silver badges8888 bronze badges 5 93 The full context (most-upvoted answer) is good, but this answer https://emperiumgurugram.in/