← Back to challenges

Daniel Likes Wendy

JavaScriptHardstringsalgorithmsnumbersvalidation

Instructions

Your job is to figure out why Daniel likes Wendy, and some other girls. If you look at the Tests tab you'll notice that Daniel doesn't like many girls.

Create a function that returns whether he likes her true, or not false.

Examples

danielLikes("Imani") ➞ false

danielLikes("Margo") ➞ true

danielLikes("Sandra") ➞ false

Notes

  • Daniel likes his own name.
  • If you figure it out, prepare to say aha!
  • You get 500 girl names, enough to try different approaches.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.