Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Stressful Subject by vincent.tscherter
"use strict";
function isStressful(subj) {
if (subj.match(/!!!$/))return true
subj = subj.replace(/\W/g,'');
if (subj.match(/^[A-Z]*$/)) return true
if (subj.match(/h+e+l+p+|a+s+a+p+|u+r+g+e+n+t/i)) return true
return false;
}
var assert = require('assert');
if (!global.is_checking) {
assert.equal(isStressful("Hi"), false, "First")
assert.equal(isStressful("I neeed HELP"), true, "Second")
console.log("Done! Go Check it!");
}
July 2, 2017
Comments: