Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 665 Bytes

File metadata and controls

34 lines (21 loc) · 665 Bytes

Seven Boom

Create a function that takes an array of numbers and return "Boom!" if the digit 7 appears in the array.

Otherwise, return "There is no 7 in the array".


Examples:

  • 7 contains the number seven.

    sevenBoom([1, 2, 3, 4, 5, 6, 7]) ➞ "Boom!"
    
  • None of the items contain 7 within them.

    sevenBoom([8, 6, 33, 100]) ➞ "There is no 7 in the array"
    
  • 97 contains the number seven.

    sevenBoom([2, 55, 60, 97, 86]) ➞ "Boom!"
    

Solution: