Hello, everyone!

I am currently in the process of creating and perfecting a statistics calculator. Everything has been going great, except for one particular function, and that is the mode, or most often, of the number set. I currently have this function for finding repeated numbers:

```
mode = [];
for (i = 0; i < list.length; i++) {
for (j = i + 1; j < list.length; j++) {
if (list[i] === list[j] && mode.includes(list[i]) === false) {
mode.push(list[i]); //creates an array for the mode(s) (WIP)
}
}
}
console.log("The mode(s) are " + mode + " ~ WIP ~"); //displays the mode(s) (WIP)
```

The problem with this function is that it works well for finding duplicates, but it will display *all* duplicates, and not the most repeated number. For example, the number set [10, 17, 16, 14, 18, 3, 13, 16, 4, 2, 6, 20, 16, 5, 11, 7, 19, 11] returns both 11 and 16 as modes, but 16 is the only mode because it is repeated twice, while 11 is only repeated once. Does anyone have a simple way of making this work, like putting the possible modes into an array, and checking for the most repeated in the array? Any help would be greatly appreciated. Thanks!

~ TBNRmyth