👨💻 Hello everyone.
DAY 4/7
I remember not being able to do this challenge a few weeks ago, despite being an easy challenge I ended up complicating it a lot and leaving the code very confusing, I adopted best practices and managed to have a good result! I really liked the result!
I managed to improve my js a lot, and with this challenge, I'm looking forward to more complex challenges.
I was having doubts about how to use the addEventListener
method in a variable that contained more than one element of the same type, with this one I managed to solve the problem!
btns.forEach(rate => {
rate.addEventListener('click', () => {
res.innerHTML = rate.value
})
})
I added some details:
- 👨💻 Button to go back and rate again!
- 👨🎨 Card animation going in and out!
Feel free to leave comments on how I can improve my code.
Thanks! 😊