Seems like a good problem for regex with backreferences. JavaScript:
function tripledouble(num1, num2) { return /(\d)\1\1.*,.*\1\1/.test(`${num1},${num2}`) ? 1 : 0; }
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.
re: Daily Challenge #18 - Triple Trouble VIEW POST
FULL DISCUSSIONSeems like a good problem for regex with backreferences. JavaScript: