JSFiddle - React, Tailwind, and code Playground
JavaScript
function m(a){c="abc-def-ghi-jkl-mno-pqrstuv-wxyz";j=a.split("");for(z in j)if(j[z]=Math.floor(c.indexOf(j[z])/4),0!=z&&j[z-1]==j[z])return 0;return 1};
function test(val){
document.body.innerHTML+=(val+" -> "+!!m(val)+"<br/>");
}
test("x");
test("aardvark");
test("ardvark");
test("flonk");
document.body.innerHTML+="<br/>";
test("im codegolfing all day long");
test("i indulge in minimizing bytecount");
document.body.innerHTML+="<br/>";
test("havent heard from you in a long time");
test("your silence was of undue permanence");
document.body.innerHTML+="<br/>";
test("how are you");
test("how are you");