JSFiddle - React, Tailwind, and code Playground

by luka kupunia

JavaScript

var a = [ 1 , 5 , 4 , 8 ];

function sortA (a, b , c) {
	return (a - b - c);
}

a.sort(sortA);

console.log(a)