Please can you tell me what is wrong to this implementation of bubble sort algorithm in JavaScript?
for (var i=1; i<records.length; i++){
for (var j=records.length; j<1; j--){
if (parseInt(records[i-1]) < parseInt(records[i])){
var temp = records[i-1];
records[i-1] = records[i]
records[i] = temp;
}
}
}