- จงแก้ไขให้ปุ่ม Dont Push me สามารถทำงานได้อย่างถูกต้อง
Before Edit
const btnDontPush = document.getElementById('btnDontPush')
btnDontPush.addEventListener('click', function () {
const clicked = function () {
this.textContent = 'Why you clicked me 😑'
this.className = 'big-button-red'
}
clicked()
})
Result
- ห้ามใช้ตัวแปร btnDontPush ที่ประกาศไว้