There's really no need to create these vars since they are only used once. Could simply be:

```
                languages.sort(function (lang1, lang2) {
                    return lang1.label.localeCompare(lang2.label);
                });
```