Skip to content

Instantly share code, notes, and snippets.

@tajuszk
Last active June 21, 2020 00:47
Show Gist options
  • Save tajuszk/401a13fb2a6e61c9ae334dd3d775a282 to your computer and use it in GitHub Desktop.
Save tajuszk/401a13fb2a6e61c9ae334dd3d775a282 to your computer and use it in GitHub Desktop.
// 参加者数
const MEMBER_COUNT = 300
// 使っても良い金額
const USABLE_MONEY = 300
// 遠足での子供の確認
function childrenCheck () {
// 全員のお金チェック
for (let i = 0; i < MEMBER_COUNT; i++) {
if (useMoney > USABLE_MONEY) {
alert('使いすぎ!!!')
}
}
// 人員確認
if (currentMemberCount !== MEMBER_COUNT) {
alert('誰かがいないか、なんか増えてる!!!')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment