From Dark and Darker Wiki
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
} | } | ||
var max = | var max = data[0]["x"]; | ||
var min = max; | var min = max; | ||
for (let i = 0; i < | for (let i = 0; i < data.length; i++) { | ||
if ( | if (data[i]["x"] > max) { | ||
max = | max = data[i]["x"]; | ||
} | } | ||
if ( | if (data[i]["x"] < min) { | ||
min = | min = data[i]["x"]; | ||
} | } | ||
} | } |