I have a database of sport results that looks like this:
const database = [{"distance in km": 10, "duration": "00:45:36", "pace": "00:04:34"}];
To calculate the
pacevalue, I have to divide thedurationby thenumber of kilometers, but how do I do that? Whatever method I try, it returnsNaN.How do I perform calculations on multiple duration values? E.g. how do I get an average pace of three runs? (
0:05:22,00:04:54and00:05:05should give an average of00:05:07)