My example of sort cards The compare function sort all the values in the array, two values at a time [a, b]. You can use my code with numerical and alphabetical sorting for experiments file path: sort-card/src/sortCards.js Install npm i axios How to run a project: npm start