You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is totally up to you depending on how you prefer to structure things, but it seems like you're embracing the functional style and using higher order functions where available. You can use a .map() here to handle the atomic change (toLowerCase) on each option. You can also use the ES6 Array.includes to clean up some of the messy !== -1 checking.
This is definitely more of a preference kind of thing so feel free to just close this one if you prefer. The (very small) changes I'd recommend are the following:
This is totally up to you depending on how you prefer to structure things, but it seems like you're embracing the functional style and using higher order functions where available. You can use a
.map()
here to handle the atomic change (toLowerCase
) on each option. You can also use the ES6Array.includes
to clean up some of the messy!== -1
checking.This is definitely more of a preference kind of thing so feel free to just close this one if you prefer. The (very small) changes I'd recommend are the following:
The text was updated successfully, but these errors were encountered: