I want to abbreviate this:
data.urlPath !== '#profile' && data.urlPath !== '#communities' && data.urlPath !== '#other'
to something like:
data.urlPath !== '#profile' || '#communities' || '#other'
// this doesn't work
is this possible?
I want to abbreviate this:
data.urlPath !== '#profile' && data.urlPath !== '#communities' && data.urlPath !== '#other'
to something like:
data.urlPath !== '#profile' || '#communities' || '#other'
// this doesn't work
is this possible?
Try this,
['#profile', '#communities','#other'].includes(data.urlPath)