← Back to challenges

Find Danny

JavaScriptHardregexalgorithmsstrings

Instructions

Create a function that takes a string and returns true if Danny is found and false if he's not.

Examples

checkIfDannyIsHere("is there dan here ?") ➞ false

checkIfDannyIsHere("I found you d4nny") ➞ true

checkIfDannyIsHere("and here dan ny ?") ➞ false

checkIfDannyIsHere("danny is here") ➞ true

Notes

Danny likes to hide himself using leetspeak.

  • D letter: d, D, |), [), |], 1)
  • A letter: a, A, @, 4, ^, /\, /-\
  • N letter: n, N, |\|, /\/, (\)
  • Y letter: y, Y, `/, '/, °/
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.