Created
May 27, 2022 11:52
-
-
Save fkmhrk/0828911af9adf5ed9a3e956d5d3ee2e4 to your computer and use it in GitHub Desktop.
JavaScript Lesson 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 呼ぶと足し算した結果を返すけど、100以上だったら100を返す | |
// 関数となるよう、空欄を埋めてね | |
function myAdd(a1, a2) { | |
// 空欄 | |
} | |
const result1 = myAdd(35, 54) | |
console.log(result1) // 89とでる | |
const result2 = myAdd(77, 28) | |
console.log(result2) // 足すと100以上になるので、100とでる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment