Code:
let kick = document.getElementById('kick_btn')
const post_method = () => {
Axios.post('/kick')
}
kick.addEventListener('click', post_method)
So I am trying to add a click event on a button, But I am getting an error
But I don't understand why anyone got an idea?Uncaught TypeError: Cannot read property 'addEventListener' of null
at post_button.js:7
