javascript – Problems with sort() and knockoutjs


I'm having trouble sorting an observableArray of knockoutjs, every time I order the list it gives a reversal() effect.

Who asks to solve this problem?


Well, the parameter a and b of sort is an object, so you should call the function as the number is an observable 🙂

Here's a working example, I hope you understand what the error was!

Scroll to Top