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([81,2,69,34,76,64,16,9]).join(","));