Skip to content

Instantly share code, notes, and snippets.

@fkmhrk
Created June 1, 2022 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fkmhrk/b026aac04f67c10b4e5981555b7ea19f to your computer and use it in GitHub Desktop.
Save fkmhrk/b026aac04f67c10b4e5981555b7ea19f to your computer and use it in GitHub Desktop.
JavaScript Lesson 3
// 配列の中から、最大のものを取り出す関数にしよう
function findMax(arr) {
// 空欄
}
const result1 = findMax([2, 5, 1, 8, 3])
console.log(result1) // 8とでる
const result2 = findMax([10, 49, 1380, 7, 269, 1095])
console.log(result2) // 1380とでる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment