the LEGO Group interview question

Javascript co-programming. Find the longest consequetive numbers length in the array.