10 10 2 4 20 20 10 10 2 4 20 20 Both are present False Found 10 next to a 10 20 next to a 20 Found Checking array contains an element 10 next to 10 oran element 20 next to 20, but not both w3resource.com