thanks for your reply. Your method replicates the function I tried in a browser but I couldn’t find a simple way to pass the array values to the method in Servoy.
It works, but I don’t understand the innner logic of this function. Probably I should study javascript
You should indeed try to get more knowledge about JavaScript
But here is what basically happens:```
return arguments[0] - arguments[1]
arguments[0] is the first value used in the method
arguments[1] is the second value used in the method
These values are 2 sequential values in the array.
The returned result is either negative or positive and influences the sorting order.
Basically the sorting will perform a loop where values trade places based upon the positive or negative value
thank you: your reply clarifies some of my perplexities. But what I still don’t fully understand is how parameters are passed to the sorting method. Usually you have to explicity do that using method(param1,param2…). In this case the parameter is the sorting method, so I imagine that the values are passed to the method by the inner logic of the javascript sort function. Not so intuitive. Maybe this has something to do with the lack of explicity declared pointers in javascript, something I have not yet fully elaborated.