This website uses cookies to ensure you get the best experience on our website. Read more...
Write a program to count maximum consecutive numbers from an array.
const arr = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 3, 3];
Here 4 is the maximum consecutive number.