305 B
305 B
importance: 5
Check for spam
Write a function checkSpam(str)
that returns true
if str
contains 'viagra' or 'XXX', otherwise `false.
The function must be case-insensitive:
checkSpam('buy ViAgRA now') == true
checkSpam('free xxxxx') == true
checkSpam("innocent rabbit") == false