You cannot perform this function with indexOf please some help

I wrote the function contains to tell us if an array contains a certain element.

  contains ([1, 6, 7, 6], 7)
true
  contains ([1, 6, 7, 6], 6)
true
  contains ([], 7)
false
  contains ([8, 5], 7)

Can you post the code you’ve written?

It would be too difficult to troubleshoot your problem with just this explanation.