JavaScript Snippet
< script > var listElement = document . getElementsByClassName ( "first" ); var statusVal = document . getElementById ( "bookStatus" ); var colorBg = document . getElementById ( "buyBtn" ); var buy = document . getElementById ( "firstCell" ); var available = document . getElementById ( "bookAvailable" ); colorBg . addEventListener ( "click" , () => { // console.log("Success! addEventListener is working") // colorBg.innerHTML = "Success! addEventListener is working"; available . classList . add ( "sample" ); st...