I am trying to build a simple algorithm to achieve the best combination of values based on two params in an array of objects.
array
objects
The whole code