Hi, i have an array which contain object name and weight.
Now i want to sort the array based on their weight.
Code:
NonLiv2 = [
["bottle", 2],
["Book", 2],
["iron", 2],
["Lock", 2],
["cup", 2],
["phone", 2],
["camera", 2],
["toothpaste", 2]
];
Comment