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
I noticed today that quite often I have something like
if(someVar==='value1'){}
and then I need to add another possible value so I either need to do || someVar === 'value2' or more concisely if (['value1', 'value2'].includes(someVar))
So would be nice if there was a refactoring to convert === to Array includes call (and bonus if I already have an OR statement and I could convert both of them to one includes call
The text was updated successfully, but these errors were encountered:
I noticed today that quite often I have something like
and then I need to add another possible value so I either need to do
|| someVar === 'value2'
or more conciselyif (['value1', 'value2'].includes(someVar))
So would be nice if there was a refactoring to convert === to Array includes call (and bonus if I already have an OR statement and I could convert both of them to one includes call
The text was updated successfully, but these errors were encountered: