I have an array as below, what I want to do is find the most repeated numbers and the least repeated numbers. but the array is according to the array index number
output hot = [5,3,2,6,4] output cold = [1,4,11,30,30]
const numbers = [1, 2, 3, 2, 4, 5, 5, 6, 5, 9, 3, 3, 5, 5, 6, 11,30, 20];