Generation

generate functionMon, 27 Mar 2023

Ordenar un array

ordernar (array) { let max = array.length; let temp; for (let i = 0; i < max-1; i++) { if(array[i] < array[i+1]) { temp = array[i]; array[i] = array[i+1]; array[i+1] = temp; } } return array; }

TypeScript
Generate More

Questions about programming?Chat with your personal AI assistant