Second-largest sub-massium
-
There's a mass.
var mass = [ ['tv', 500], ['mobile', 300], ['car', 10000] ];
How do you distort him, according to the second value of each mass, what would it be?
var mass = [ ['mobile', 300], ['tv', 500], ['car', 10000] ];
-
mass.sort(function (a, b) { return a[1] - b[1]; });