Javascript – Manually sorting a Javavascript array
I want to create a JavaScript Function that sorts numbers from maximum to minimum without using the traditional .sort() method const sortArray= (array)=>{ let newArray = [] let firstArray = array[0] for(const num in array){ if(num>firstArray){ firstArray = num newArray.push(firstArray)…