← Back to challenges

Letters Only

JavaScriptHardstringsregexformatting

Instructions

Write a function that removes any non-letters from a string, returning a well-known film title.

Examples

lettersOnly("R!=:~0o0./c&}9k`60=y") ➞ "Rocky"

lettersOnly("^,]%4B|@56a![0{2m>b1&4i4") ➞ "Bambi"

lettersOnly("^U)6$22>8p).") ➞ "Up"

Notes

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Recursion: Reverse a String