I've been struggling with making a function that changes the value of the boolean if the requirement is completed.
Below he code:
let width = false
let height = false
function ___(boolean){
if (document.getElementById("input").value == ""){
boolean = false
console.log(width)
console.log(height)
}
else if (document.getElementById("input").value !== ""){
boolean = true
console.log(width)
console.log(height)
}
}
document.getElementById("input").addEventListener('keyup', function(){___(width)})
The problem is that booleans of width and height do not change. How to fix this problem?