JSFiddle - React, Tailwind, and code Playground
by Diana Lemen
JavaScript
const A = [5,2,4,6,1,3];
const B = [];
B.push(A[0]);
for(let j = 1; j < A.length; j++) {
let i = j - 1;
let key = A[i];
b.push(key);
for(let y = B[i - 1]; y >= key; i--) {
const a = y;
B[i - 1] = key;
B[i] = a;
}
}
conso
console.log('bla');