How to find if an array contains a specific string in JavaScript/jQuery?

preview_player
Показать описание
#short
#javascript
#jquery
#arrays
#string
Can someone tell me how to detect if "specialword" appears in an array? Example:
categories: [
"specialword"
"word1"
"word2"
]
Рекомендации по теме