🎃

1つの文字列に、配列の文字列が全て含まれているか

2021/08/26に公開

Answer

var str = "apple_mango_banana";
var arr = ["apple", "banana"];

var isEvery = arr.every((item) => str.includes(item));

console.log(isEvery);

Refs

https://stackoverflow.com/a/40649736/8023331

Discussion