skip to Main Content

Javascript – Closures and Events

I am learning JavaScript. I was practicing applying closures but I got stuck and am not able to find the issue with my code. function change_greeting() { let on_or_off = 1; return function button() { if (on_or_off) { document.getElementById("demo") =…

VIEW QUESTION
Back To Top
Search