Pesanan naik dengan for loop di dart
List<int> a = [1000, 500, 700, 7000, 1 , 2, 4 ,3];
for (var i = 1; i < a.length; i++)
for (var j = 0; j < i; j++)
if (a[i] < a[j]) {
var x = a[i];
a[i] = a[j];
a[j] = x;
}
print(a);
Saim Ishtiaq