我想为某些单词制作一个内容过滤器,然后将这些单词显示在控制台日志中。这是 js Fiddle 链接:http: //jsfiddle.net/Kz42U/4/
var words1 = prompt("Type In Anything");
var words2 = prompt("Type In Anything");
if (words1 == words2){
alert("Words are Equal");
}
else {
alert("Words Are Not Equal");
}
var eliminateWord = function (doubles) {
if "go" in words1():{
console.log("user has entered go")
}
};