Mdn Web Docs Event Exercises I am new to coding exercises from JavaScript, i m doing event exercises for first time trying no to cram it ,kindly help
I need to create a simple event handler that causes the text inside the button (btn) to change when it is clicked on, and change back when it is clicked again.
The HTML should not be changed; just the JavaScript.
const btn = document.querySelector('.off');
// Add your code here
btn.addEventListener(onclick, () => {
btn.innerHTML = changeText;
});