function fearNotLetter(str) { let dummy = 'abcdefghijklmnopqrstuvwxyz' let x = dummy.slice(dummy.indexOf(str[0])) let s='';
for(let j=0;j<x.length;j++){ if(str.slice(-1) == x.charAt(j)){ s = s.concat(x.charAt(j)) break; } else { s = s.concat(x.charAt(j)) } }
return s[[...str].findIndex((el, index) => el !== s[index])] }
fearNotLetter("abce");
i have done it like this do you have any suggestions ....
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
function fearNotLetter(str) {
let dummy = 'abcdefghijklmnopqrstuvwxyz'
let x = dummy.slice(dummy.indexOf(str[0]))
let s='';
for(let j=0;j<x.length;j++){
if(str.slice(-1) == x.charAt(j)){
s = s.concat(x.charAt(j))
break;
}
else {
s = s.concat(x.charAt(j))
}
}
return s[[...str].findIndex((el, index) => el !== s[index])]
}
fearNotLetter("abce");
i have done it like this do you have any suggestions ....