← Back to challenges

Double Letters

JavaScriptHardstringsregexvalidation

Instructions

Create a function that takes a word and returns true if the word has two consecutive identical letters.

Examples

doubleLetters("loop") ➞ true

doubleLetters("yummy") ➞ true

doubleLetters("orange") ➞ false

doubleLetters("munchkin") ➞ false

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Snail Goes Up the Stairs