Hello, I do not think the size of the screen changes when I resize the screen
<!DOCTYPE html>
<html lang="es">
<head>
<title>Práctica</title>
<meta charset="UTF8"/>
</head>
<body>
<p>El ancho de la pantalla es de <span id="anchoPantalla">XXXXXX</span> píxeles</p>
<p>El alto de la pantalla es de <span id="altoPantalla">XXXXXX</span> píxeles</p>
<script>
window.onresize = function(e) {
let ancho = e.innerWidth;
let alto = e.innerHeight;
console.log(ancho);
console.log(alto);
document.getElementById('anchoPantalla').textContent = ancho;
document.getElementById('altoPantalla').textContent = alto;
}
</script>
</body>
</html>