Spam check
EasyStrings3 min
Write a function checkSpam(text) that returns true if the string contains free money or xxx, and false if not. Letter case does not matter.
Examples
checkSpam('Get FREE money now')Returns true
checkSpam('xXx files')Returns true
checkSpam('Release notes')Returns false
Loading the editor...
- Input
checkSpam('Get FREE money now')Expectedtrue - Input
checkSpam('xXx files')Expectedtrue - Input
checkSpam('Release notes')Expectedfalse
Hidden tests run on Submit