To avoid 2 loops over the same key set, try something like:

```javascript
var changeString = eff.hgvs_p || eff.amino_acid_change;
var initialAminoAcid = changeString[2], finalAminoAcid = changeString[changeString.length - 1];
var initialProperty = '', finalProperty = '';

for (var change in changes) {
    if (changes[change].indexOf(initialAminoAcid) != -1) initialProperty = change;
    if (changes[change].indexOf(finalAminoAcid) != -1) finalProperty = '&#8594' + change;
}

content.push('<li>' + changeString)

if (initialProperty && finalProperty) {
    content.push(initialProperty + finalProperty);
}

content.push('</li>');
}
```