function bubble(a){a=a.slice();for(let i=0;ia[j+1])[a[j],a[j+1]]=[a[j+1],a[j]];return a;}console.log(bubble([70,73,74,27,28,43,8]).join(","));