You are doing a html += "<li></li>"
in your loop but you forget to reset this variable inside the loop. So on each iteration, the loop adds this to the container:
- item 1
- item 1, item 2
- item 1, item 2, item 3
End result:
- item 1, item 1, item 2, item 1, item 2, item 3
To fix, reset your html
variable to ""
at each iteration, e.g.:
for (var i = 0; i < entryLenght; i++) {
var html = '';
// rest of your code
}