There are 4 ways to write Events in JS -
Method 1 - By calling inline HTML events -
Method 2 - By calling function in html attribute -
Method 3 - Selecting via html id, attaching event "onclick" and then
calling a function -
Method 4 - By using event listner -
Event Bubbling/Propogation Demo -
Stopping Event Bubbling/Propogation Demo -
Demo of Removing Elements upon click -
Removal of images when they are clicked -
here are 6 images-