I have a version number with 3 digits as a String,
var version = "1.2.3";
and would like to compare it to another version. To see if version is newer than otherversion,
var otherVersion = "1.2.4";
How would you do it?
Pseudo:
.
(See @arhorns answer for a elegant implementation)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With