We're a place where coders share, stay up-to-date and grow their careers.
function solve (str) { let state = false const sorted = str .split('') .map(char => char.charCodeAt()) .sort() sorted.every((char, index) => { if(char + 1 === exp[index+1]){ state = true } }) return state }
Discussion on: Daily Challenge #304 - Consecutive Letters