Skip to content

Commit 6da7eaf

Browse files
committed
mejoras login
1 parent 71874bf commit 6da7eaf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Entregas/Entrega2/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ class Login {
3535
}
3636
login (){
3737
let x=true; let y=true;
38+
if(u.usuario===null){
39+
alert("DEBE REGISTRAR USUARIO");
40+
u.ingresoDatos();
41+
}
3842
while (x) {
3943
console.log(u.usuario);
40-
let user=prompt("USUARIO: ");
41-
if (user===u.usuario){
44+
let user=prompt("INGRESE USUARIO O X PARA MENU: ");
45+
if(user ==="X" || user==="x"){
46+
x=false;
47+
y=false;
48+
break;
49+
} else if (user===u.usuario){
4250
//alert("Usuario Valido!! /n SIGA SIGA")
4351
break;
4452
}else {alert("INGRESE USUARIO VALIDO")}

0 commit comments

Comments
 (0)