We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9750476 commit 9ebc096Copy full SHA for 9ebc096
main.js
@@ -0,0 +1,15 @@
1
+const ratingSystem = document.getElementById('rating-system');
2
+const submitButton = document.getElementById('submit-button');
3
+const ratingOutputText = document.getElementById('rating-output-text');
4
+let selectedRating = 0;
5
+let totalRating = 0;
6
+let numberOfRatings = 0;
7
+
8
+submitButton.addEventListener('click', () => {
9
+ totalRating += selectedRating;
10
+ numberOfRatings++;
11
+});
12
13
+function changeRating(rating) {
14
+ selectedRating = rating;
15
+}
0 commit comments