The example actually uses the sort method of list object.
Attach a file by drag & drop or click to upload