restructured

This commit is contained in:
Karan
2021-12-03 14:25:51 +05:30
committed by GitHub
parent a48f4297f4
commit f1a7b08aea
+2 -2
View File
@@ -36,7 +36,7 @@
stars.forEach((star, index) => {
star.starValue = (index + 1);
star.addEventListener("click", starRate);
})
});
function starRate(e) {
output.innerHTML = `You Rated this ${e.target.starValue} stars`;
stars.forEach((star, index) => {
@@ -45,7 +45,7 @@
} else {
star.classList.remove("orange");
}
})
});
}
</script>