← Back to challenges

Find the Unique Letters

JavaScriptHardstringsinterview

Instructions

Create a function that takes a string and returns an array of the letters that occur only once.

Examples

findLetters("monopoly") ➞ ["m", "n", "p", "l", "y"]

findLetters("balloon") ➞ ["b", "a", "n"]

findLetters("analysis") ➞ ["n", "l", "y", "i"]

Notes

  • The final array should not include letters that appear more than once in the string.
  • Return the letters in the sequence they were originally in, do not sort them.
  • All letters will be in lowercase.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Little Big Sequence