We could define an array of properties that we would like to copy from one object to another, something like:
`
var properties = ['password', 'identity', 'phase2', 'pin', 'certificate'];
for (var prop in properties) {
    if (aNetParams[prop]) {
        net[prop] = aNetParams[prop];
    }
}
`