<<<<<<< HEAD Code Wars - Brett Crafton

You only need one - Beginner

Question

You will be given an array a and a value x. All you need to do is check whether the provided array contains the value. Array can contain numbers or strings. X can be either. Return true if the array contains the value, false if not.

No examples

Solution by -

My Solution


	function check(a, x) {
		return a.indexOf(x) != -1
		}
				

Try it yourself - CodeWars

======= Code Wars - Brett Crafton

You only need one - Beginner

Question

You will be given an array a and a value x. All you need to do is check whether the provided array contains the value. Array can contain numbers or strings. X can be either. Return true if the array contains the value, false if not.

No examples

Solution by -

My Solution


	function check(a, x) {
		return a.indexOf(x) != -1
		}
				

Try it yourself - CodeWars

>>>>>>> 0e614172debaa009c8d31330edbeb3b765b59c39