Skip to content

Commit 796a11d

Browse files
authored
「関数」の節の演習問題2の解答を修正 (#948)
1 parent bfd26d5 commit 796a11d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
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
@@ -193,8 +193,9 @@ document.write(calculateCost(3.5));
193193
function calculateCost(monthlyDataUsage) {
194194
if (monthlyDataUsage < 5.0) {
195195
return monthlyDataUsage * 600;
196+
} else {
197+
return 3000;
196198
}
197-
return 3000;
198199
}
199200

200201
document.write(calculateCost(3.5));

0 commit comments

Comments
 (0)