SuperSimpleDev / javascript-course

708 stars 568 forks source link

"13m Solution with closure" is not working properly like the "13m Solution with object" #143

Open CountDamian opened 3 weeks ago

CountDamian commented 3 weeks ago

13m Solution with closure: this line "let addedMessageTimeoutId" that is declared outside the loop doesn't achieve the expected result. But when I move inside the loop, it works fine. From what I asked chatGPT, even though this is a more advanced solution, the solution using objects is better in terms of scalability and maintainability. Can I get your opinion on this?