I'm trying to do a little logo guessing game. I have an array of logo names and then you have to guess which logo name it is.
I have removed the whitespaces from the logo names using the code below.
var cleanLogoName = randomLogoName.replace(/ /g,'');
Then I want to know the amount of characters in the logo name by using this code.
var numberOfChar = cleanLogoName.length;
The game however is a hangman game, so I won't need to count the same characters more than once.
For example:
Coca cola
I would only need to count the the c, a, o one time and not two times.
Is there anyway to do this with javaScript?