diff --git a/capitulo 7/codigo.js b/capitulo 7/codigo.js
new file mode 100644
index 0000000..2ceccf6
--- /dev/null
+++ b/capitulo 7/codigo.js
@@ -0,0 +1,27 @@
+{ // Problema a y b de Cofla
+
+let alto = window.screen.height;
+let ancho = window.screen.width;
+
+comprar = confirm(`El alto es: ${alto}, el ancho es ${ancho}`);
+
+if (comprar){
+ alert("Compra realizada exitosamente");
+}
+else{
+ alert("Compra canecelada");
+}
+
+let href = window.location.href;
+let pathname = window.location.pathname;
+let hostname = window.location.hostname;
+let protocol = window.location.protocol;
+
+let html = `Protocolo: ${protocol}
`;
+html += `Hostname: ${hostname}
`;
+html += `Pathname: ${pathname}
`;
+html += `URL completa: ${href}
`;
+
+document.write(html);
+
+}