Given a string s consisting of small English letters, find and return the first instance of a non-repeating character in it. If there is no such character, return '_'. code example
Example: first non repeating character javascript
function firstNotRepeatingCharacter(s) {
for (let i = 0; i < s.length; i++) {
if(s.indexOf(s.charAt(i)) == s.lastIndexOf(s.charAt(i))) {
return s.charAt(i)
}
}
return '_'
}