Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Short solution in Clear category for [old] Monkey Typing by SaintDron
"use strict";
var countWords = (text, words) => words.filter(w => text.toLowerCase().includes(w)).length;
var assert = require('assert');
if (!global.is_checking) {
assert.equal(countWords("How aresjfhdskfhskd you?", ["how", "are", "you", "hello"]), 3, "Example");
assert.equal(countWords("Bananas, give me bananas!!!", ["banana", "bananas"]), 2, "BANANAS!");
assert.equal(countWords("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.", ["sum", "hamlet", "infinity", "anything"]), 1, "Weird text");
console.log("Coding complete? Click 'Check' to review your tests and earn cool rewards!");
}
Sept. 1, 2018
Comments: