var name = 'Овощное рагу из яблок';
var stop_list = ["Ябл", "Апел", "Гру"];
stop_list.forEach(function(name, stop_list) {
var myRe = /stop_list/iu;
if (myRe.exec(name)) {
console.log(name);
}
if (!/name/iu.test(stop_list) ) {
console.log(name);
}
})
if (!stop_list.some(word => name.indexOf(word) !== -1)) {
console.log(name);
}
const isConsistWord = (str, word) => str.indexOf(word) !== -1;
const isConsistFromList = (str, list) => list.some(word => isConsistWord(str, word));
var name = 'Овощное рагу из яблок';
var stop_list = ["Ябл", "Апел", "Гру"]
if (!isConsistFromList(name, stop_list)) {
console.log(name);
}