showing results for - "first non repeating character javascript"
Julie
25 Oct 2016
1function firstNotRepeatingCharacter(s) {
2    for (let i = 0; i < s.length; i++) {
3        if(s.indexOf(s.charAt(i)) == s.lastIndexOf(s.charAt(i))) {
4            return s.charAt(i)
5        }
6    }
7    return '_'    
8}
9
Isabella
05 Sep 2016
1function firstRepeatingCharacter(str) {
2  for (let i = 0; i < str.length; i++) {
3    if (str.indexOf(str.charAt(i)) !== str.lastIndexOf(str.charAt(i))) {
4      return str.charAt(i)
5    }
6  }
7  return 'no results found'
8}
queries leading to this page
first non repeating character in a string javascriptfind first non repeating character in a string in javascriptfunction not repat letter jsfirst repeating char in javascriptgiven a string 2c find the first non repeating character in it and return its index javascriptwrite a function to return the first duplicate character in array on jscheck for first non repeated character from string javascriptfirst non repeating characters problem javascriptfirst non repeated character in a string javascriptfirst non repeating character loop jsjs code to find first not repeated characterfirst recurring character javascriptfirst repeating character in a string javascriptfind first unrepeated character of a given string javascript regexhow to check a given string have repeating character in javascriptfind the first non repeating character in a string javascriptrepeated letters in words javascriptfind first non repeating character in a string jsnon repeating character javascriptfind first repeated character in given string in 22javascript 22create string of repeated characters in javascriptfind non repeating character in string jsfirst non repeating character in a string jsgiven a string 2c find the first non repeated character in that string 2a javscriptfirst not repeating chracter in string javascriptfind first non repeating character in string jscount repeated characters in string using javascriptfirst not repeating character javascriptfirst repeating character in a string foreach 28 29 javascriptgiven a string s consisting of small english letters 2c find and return the first instance of a non repeating character in it if there is no such character 2c return 27 27 js algorithm that repeat the first repeated character of a stringfirst non repeating character javascriptfind first non repeating character in a string jsreturn first non repeating character javascriptfirst repeated character in a string javascriptsecond most repeated string in a sequence in jsfirst unique character in a string javascriptfind first repeated character in given string in javascriptfind first unique character in a string javascriptprint first non repeating character from a string javascriptfirst repeated character in a string javascriptcheck for repeated characters in a string javascriptjavascript print the first non repeated character from a string 3ffind repeated characters present first in a string javascriptjavascript find the first not repeated characterfirst non repeating character using for loop javascriptjavascript find first no repeated characters in stringreturn first repeating character javascriptfirstnonrepeatedcharacter jsjavascript find first non repeating character in a stringreturn the first non repeating character in it and return its index jsfind first unrepeated character of a given string javascript regefind first repeated javascript stringrepeated letter find in string javascriptfind first repeated word in a sentence javascripthow to check for repeating letters in string jsfind the first repeated word in a sentence javascriptfirst non repeating character jsfirstr repeating char in javascriptto repeat character in an arraygiven a string find its first non repeating character javascriptfind not repeated character in array javascriptfind most repeated character in string javascriptfirst non repeating character codewars jsfirst non repeating character javascriptfind first unrepeated character of a given string javascriptfind repeating characters in a string javascriptfirst non repeating character javascript regexfind first non repeating character in string javascriptfirst repeating character in a string jsfind first non repetive char from the given string considering string is sorted jsjavascript remove a specific repeated characters from stringnon repeating character javascript coderbytehow to find first repeated character in a string in javascriptuse set to get first non repeated character in a string javascriptrepeating letter using javascriptreturn 1st recurring character in a string javascripthow do you print the first non repeated character from a string in javascriptjavascript string first non repeating character first non repeating character problem in javascriptjavascript first non repeating charactergiven a string s consisting of small english letters 2c find and return the first instance of a non repeating character in it if there is no such character 2c returnfind first repeated character in given string in jshow to find first repeated char in a string jsfirst single character non repeating javascriptfirst non repeating character javascript