@Eileenpk
Posted
Hi Nahuel-cell, your project looks good.
I would consider changing the let rating;
to let rating = null
It is generally considered good practice to initialize a variable with a value, rather than declaring it without a value. If you are declaring a variable with a type "let" or "const" and you're going to assign it a value later, it's a good idea to initialize it with a default value, like null. This is because, if you don't initialize a variable and try to use it before assigning a value to it, it will throw a "ReferenceError: variable is not defined" error. By initializing a variable with a default value, you can avoid this issue and make your code more predictable. Additionally, if you are going to use a variable in an expression, it's a good idea to initialize it with a default value that is appropriate for the expression, such as an empty string or zero. So, it is considered a good practice to initialize a variable with a default value, such as null, when you are going to assign it a value later.
Hope you found this helpful!
- Let's connect on LinkedIn! - @Eileenpk
Marked as helpful
@Nahuel-cell
Posted
@Eileenpk Thank you very much for your comment!. I'll keep it in mind