I am working with a Vue array that consists of 3 objects with names and rates. I have already implemented a function to sort the items by rate:
methods: {
sortByRate() {
this.complejos = this.complejos.sort(function(a, b) { return a.rate - b.rate });
}
}
Now, I am in need of a function that can sort the items based on the order they were added, essentially sorting them by last added.
You can view the Fiddle here: https://jsfiddle.net/1u4mzqwj/