-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (34 loc) · 1.06 KB
/
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
40
41
let homeScoreBtnOne = document.getElementById("home-score-btn1");
let homeScoreBtnTwo = document.getElementById("home-score-btn2");
let homeScoreBtnThree = document.getElementById("home-score-btn3");
let homeScoreEl = document.getElementById("home-score");
let homeScore = 0;
let guestScoreBtnOne = document.getElementById("guest-score-btn1");
let guestScoreBtnTwo = document.getElementById("guest-score-btn2");
let guestScoreBtnThree = document.getElementById("guest-score-btn3");
let guestScoreEl = document.getElementById("guest-score");
let guestScore = 0;
function homeAddOne() {
homeScore += 1;
homeScoreEl.textContent = homeScore;
}
function homeAddTwo() {
homeScore += 2;
homeScoreEl.textContent = homeScore;
}
function homeAddThree() {
homeScore += 3;
homeScoreEl.textContent = homeScore;
}
function guestAddOne() {
guestScore += 1;
guestScoreEl.textContent = guestScore;
}
function guestAddTwo() {
guestScore += 2;
guestScoreEl.textContent = guestScore;
}
function guestAddThree() {
guestScore += 3;
guestScoreEl.textContent = guestScore;
}