var data = [10,242,536,75,24,35,1,4,3,67]
for(var i=1;i<=data.length-1;i++){
for(var j=1;j<=data.length-i;j++){
if(data[j-1]>data[j]){
var sub=data[j-1];
data[j-1]=data[j];
data[j]=sub
}
}
}
console.log(data)
[1, 3, 4, 10, 24, 35, 67, 75, 242, 536]