You can archive arrays before sorting and unzip them after sorting:
var a = ["human", "animal", "plant"], b = ["person", "beast", "nature"], zipped = [];
... but I think @duffymo got the best deal for you. Use object / hash / associative array / map.
var a = [{key: 'human', value: 'person'}, {key: 'animal', value: 'beast'}, {key: 'plant', value: 'nature'}]; a.sort(function (x, y) { return x.key - y.key; });
source share