What is a better way of testing if a string doesn't equal a bunch of stuff?

javascript

Solution

Make an array and use `indexOf`:

['NEBC', 'station:|slot:', 'slot:', 'believe'].indexOf(breadCrumbArr[x]) === -1

Problem

right now I have: ``` if (breadCrumbArr[x] !== 'NEBC' && breadCrumbArr[x] !== 'station:|slot:' && breadCrumbArr[x] !== 'slot:' && breadCrumbArr[x] !== 'believe') { // more code } ``` But I think this could be done better...

Original source

Related problems