The solution includes a guard clause that does not change the functionality of the function. The variable "product" is declared with a value of 1, so in the case of 'n === 0' the for loop won't run (let i = n; i > 0), and it will return product with the declared value of 1
Because
The solution includes a guard clause that does not change the functionality of the function. The variable "product" is declared with a value of 1, so in the case of 'n === 0' the for loop won't run (let i = n; i > 0), and it will return product with the declared value of 1
This PR
Issue
Additional Information
https://discord.com/channels/505093832157691914/690590001486102589/1296871107109982208
Pull Request Requirements
location of change: brief description of change
format, e.g.01_helloWorld: Update test cases
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section/solutions
folder