This could use Object.keys(removedProperties).forEach(function(key) {...})