Pergunta de entrevista da empresa Axienta

simple problem to check if the array contains 2 consecutive numbers only.