6/13 Don't Repeat Yourself


#1

var orangeCost = function ( price, total ) {
total = price * 5;
console.log(total);
};
orangeCost(5);


#2

var orangeCost = function (price) {
total = price * 5;
console.log(total);
};
orangeCost(5);

only one parameter needed here !


#3

console.log(price * 5);
no need in "total".