Nit: You could just use `function compareVersion` instead, with the added benefit of giving the function itself a name (makes it easier to see what happened when debugging sometimes).