@Sam10-debugSubmitted over 2 years ago
jfpccaballero
@jfpccaballeroAll comments
- @jfpccaballeroPosted over 2 years ago
You should try to use a for loop, or forEach for the ratings so you avoid repeating so much code
const numbers = document.querySelectorAll(".here add a class that all the numbers have ");
numbers.forEach(number => { number.onclick = ( ) => {
console.log(number.id); }
});
// this replaces addEventListener and here you should write what do you want to happen when selecting a rate. //
// play with the console to see how it works, for example add an id for each number and retrieve with console.log //Also try to keep all the style in your css sheet and just writing to add or remove classes on js
Marked as helpful1