-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
39 lines (36 loc) · 825 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
let homeScoreEl = document.getElementById("home-score")
let guestScoreEl = document.getElementById("guest-score")
let homeScore = 0
let guestScore = 0
function reset(){
homeScore = 0
guestScore = 0
homeScoreEl.textContent = homeScore
guestScoreEl.textContent = guestScore
}
function increment_home1(){
homeScore += 1
homeScoreEl.textContent = homeScore
}
function increment_home2(){
increment_home1()
increment_home1()
}
function increment_home3(){
increment_home1()
increment_home1()
increment_home1()
}
function increment_guest1(){
guestScore += 1
guestScoreEl.textContent = guestScore
}
function increment_guest2(){
increment_guest1()
increment_guest1()
}
function increment_guest3(){
increment_guest1()
increment_guest1()
increment_guest1()
}