在names数组中查找是否存name中的值
function test() {
var names = ["tom", "many", "jack"];
var name = ["many"];
try {
names.forEach(values=>{
name.forEach(value=>{
if(value == values){
throw new Error("我是many");
}
})
})
console.log("我是一直执行完了");
} catch(e) {
console.log(e.message);
return false;
}
}