I don’t know how that is calculated?
instances:
const points = [40, 100, 1, 5, 25, 10];
points.sort(function(a, b){return a - b});
output: 1,5,10,25,40,100
output is okay. But how is it calculated?
I tried but I can’t match a and b equations
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I don’t know how that is calculated?
instances:
const points = [40, 100, 1, 5, 25, 10];
points.sort(function(a, b){return a - b});
output: 1,5,10,25,40,100
output is okay. But how is it calculated?
I tried but I can’t match a and b equations