Skip to content

Commit 9709b7b

Browse files
committed
「関数」の節の演習問題2の解答を修正
1 parent 8dc0a3f commit 9709b7b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
function calculateCost(monthlyDataUsage) {
22
if (monthlyDataUsage < 5.0) {
33
return monthlyDataUsage * 600;
4+
} else {
5+
return 3000;
46
}
5-
return 3000;
67
}
78

89
document.write(calculateCost(3.5));

docs/1-trial-session/09-functions/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ document.write(calculateCost(3.5));
214214
function calculateCost(monthlyDataUsage) {
215215
if (monthlyDataUsage < 5.0) {
216216
return monthlyDataUsage * 600;
217+
} else {
218+
return 3000;
217219
}
218-
return 3000;
219220
}
220221

221222
document.write(calculateCost(3.5));

0 commit comments

Comments
 (0)