Easy
You're building a content filtering system. What will this code output when processing user-generated content?
1const filterContent = (text) => {2 const words = text.toLowerCase().split(' ');3 const result = words.some((word, index) => {4 if (word === 'and') {5 return words[index - 1] === 'click' ||6 words[index + 1] === 'subscribe';7 }8 return false;9 });10 return result;11};1213console.log(filterContent("Please click and subscribe to my channel"));14console.log(filterContent("Click here and watch"));15console.log(filterContent("Like and comment below"));