Erik Jaime Pacheco Arana@erikjaimepachecoarana
Hola estaba haciendo los ejercicios que estaba haciendo alvaro en JavaScript en el navegador y me sale este error uncaught syntaxerror unexpected token if y quiero que me ayuden a resolverlo ,según VS no hay errores pero cuando reviso en la consola del navegador me sale ese error(soy nuevo ) mi codigo es este :
const form = document.getElementById("form-tester"),
if(from){form.addEventListener("submit", () => {let width = form.querySelector("#width"), url = form.querySelector("#url"), height = form.querySelector("#height");
if(width && url && height){
width = width.value
height = height.value
url = url.value
}
window.open(url,url,`width=${width},height=${height}`)
})
}
Escribe una respuesta