function f(x,y) {

if (x.startsWith("d")) return false;

if (x.endsWith(y)) return true;

}

Reply to this note

Please Login to reply.

Discussion

function f(x,y) {

const splittedX = x.split(".");

if (splittedX.length > 3) return false;

if (x.endsWith(y)) return true;

}