---
title: compareVersions
framework: Installer JS
role: pseudoSymbol
path: installer_js/system/1812314-compareversions
---

# compareVersions

Provides the result of comparing two given version strings (for example, '10.3.1' and '10.4').

## Declaration

```data
compareVersions(versionA, versionB)
```

## Parameters

- `versionA`: String with the first operand version.
- `versionB`: String with the second operand version.

## Return Value

Return Value -1 when versionA is lower than versionB, 0 when versionA is equal to versionB, and 1 when versionA is higher than versionB.
