Skip to content

Commit adff083

Browse files
SequoiaSebastien Armand - sa250111
authored and
Sebastien Armand - sa250111
committed
docs(concepts): Remove pointless * 1s
Closes angular#6206
1 parent 51ed285 commit adff083

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/content/guide/concepts.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ different currencies and also pay the invoice.
120120
return this.convertCurrency(this.qty * this.cost, this.inCurr, outCurr);
121121
};
122122
this.convertCurrency = function convertCurrency(amount, inCurr, outCurr) {
123-
return amount * this.usdToForeignRates[outCurr] * 1 / this.usdToForeignRates[inCurr];
123+
return amount * this.usdToForeignRates[outCurr] / this.usdToForeignRates[inCurr];
124124
};
125125
this.pay = function pay() {
126126
window.alert("Thanks!");
@@ -207,7 +207,7 @@ Let's refactor our example and move the currency conversion into a service in an
207207
};
208208

209209
function convert(amount, inCurr, outCurr) {
210-
return amount * usdToForeignRates[outCurr] * 1 / usdToForeignRates[inCurr];
210+
return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr];
211211
}
212212
});
213213
</file>
@@ -336,7 +336,7 @@ The following example shows how this is done with Angular:
336336
};
337337

338338
function convert(amount, inCurr, outCurr) {
339-
return amount * usdToForeignRates[outCurr] * 1 / usdToForeignRates[inCurr];
339+
return amount * usdToForeignRates[outCurr] / usdToForeignRates[inCurr];
340340
}
341341

342342
function refresh() {

0 commit comments

Comments
 (0)