Using JavaScript, I\'m trying to find a way to find the longest occurrence of the same number (in this case, 1) in an array.
For instance, here\'s a sample array:
You will need another two arrays here.
I did not make the code for you to try it yourself first since you are asking only for some pointers