if ( window.innerWidth < 500 ) {
lalo()
} else {
//aqui destruir funcion lalo
lalo2() //ejecuta una nueva funcion
}
In summary what I want to do is that when the width of my browser is less than 500px a function is executed, but when it is bigger, that function is eliminated or its content is emptied. I need this so that it does not interfere with the another function that is going to be executed when the width of the navigator is greater than 500. That the two functions run together creates a conflict.