I have an array with strings comprising of numbers in a dotted notation as such:
var arr = ['1.2.5.4', '1.2.5.3'];
I would like to be able to find the string that denotes the highest value.
I already tried
Math.max.apply(null, arr)
Since there are multiple decimals, it simply won’t work.
This seems a simpler solution:
Thanks for the vote, on review I noted a bug which I have corrected in the code above.