Adobe Interview Question

Whiteboard coding question - k-means algorithm Find errors in the JavaScript