lesson-cover

Go Back

Variables & Functions

Letter Find

Write a function called solution that takes in 2 parameters, a string and a letter, and returns true if the character exists in the string, false if the character does not exist in the string.

result = solution('abc', 'a') // true
result = solution('abc', 'd') // false

Reminder for students with prior experience: you are not allowed to use for and while loops. Reason