310 Parameterize Function
//FROM
function tenPercentRaise(aPerson) {
aPerson.salary = aPerson.salary.multiply(1.1);
}
function fivePercentRaise(aPerson) {
aPerson.salary = aPerson.salary.multiply(1.05);
}
//TO
function raise(aPerson, factor) {
aPerson.salary = aPerson.salary.multiply(1 + factor);
}