Home

ABCheck

Check if the letters a or b are exactly 3 positions away from each other.

Answer

function ABCheck(str) { return /(a...b|b...a)/gi.test(str); }