DEV Community

Discussion on: JavaScript Katas: Higher Version

Collapse
 
pentacular profile image
pentacular

Adjust the partition if you want to exclude the equal case.

const higherVersion = (string1, string2) =>
  orderVersions(toVersion(string1), toVersion(string2)) > 0;