You are viewing a single comment's thread. Return to all comments →
Javascript:
const lines = input.split(/^\d+\s*$/gm); const words = lines[2].trim().split("\n"); words.forEach((word) => { const regex = new RegExp(`\\b(${word}|${word.replace('our', 'or')})\\b`, 'gm'); const total = lines[1].match(regex); console.log(total?.length || 0); })
Seems like cookies are disabled on this browser, please enable them to open this website
UK and US: Part 2
You are viewing a single comment's thread. Return to all comments →
Javascript: