Use Array.some instead of forEach