Lets say I have 5 characters i dont want the user to have in the input field so instead of writeing like this:
Expand|Select|Wrap|Line Numbers
- my_value.indexOf('first') == -1
- my_value.indexOf('second') == -1
- my_value.indexOf('3rd') == -1
- my_value.indexOf('4th') == -1
- my_value.indexOf('5th') == -1 and so on...
- I would write like this:
- var array_value = new Array("first", "second", "3rd", "4th" ,"5th");
- value.indexOf(array_value) == -1