-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cipher #30
base: master
Are you sure you want to change the base?
Cipher #30
Conversation
src/cipher.js
Outdated
@@ -1,9 +1,19 @@ | |||
window.cipher.encode(offset, string) => | |||
window.cipher = { //window valor global, cipher es el objeto | |||
encode(string, offset) => { //Codificar, cadena de texto, numero de desplazamiento |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Por qué window.cipher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window porque es una forma global de manejar los eventos y propiedades del dom y cipher solo es el objeto con el que se esta trabajando
src/cipher.js
Outdated
let wordCipher = ""; //variable para que introduzcan la palabra a descifrar | ||
for ( i = 0; i < string.lenght; i++ ){ //mi ciclo "for" se va a estar ejecutando cada que el usuario introduzca una cadena de texto e ira incrementando | ||
let word = string[i]; //variable que declara que word es igual a una cadena de texto[incrementar] | ||
if (word.match(/[a-z]/i)){//mi variable word solo se va a ejecutar siempre y cuando sea equivalente a solo letras |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Súper buena aportación!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gracias, así "desmenuzandolo" es una manera mas fácil de comprender un poco porque lleva cada cosa
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En general todo muy bien, cuida tu indentación!
src/index.html
Outdated
<div class="contenedor"> | ||
<div class= "elemento elemento0"><h1>¡Advertencia!</h1><br></div> | ||
|
||
<div class= "elemento elemento1">Solo se pueden utilizar Mayúsculas</div> | ||
<div class= "elemento elemento2">No admite letra "Ñ"</div> | ||
<div class= "elemento elemento3">No admite caracteres ni numeros</div> | ||
|
||
|
||
<br> | ||
<form method="post" action="index2.html"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trata de encontrar una forma de no utilizar
, se puede arreglar con CSS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si claro en un momento lo arreglo
Muchas gracias es un pequeño avance pero significativo para mí 🖤 |
Buenos días, aquí esta mi proyecto "Cipher", tuve muchos inconvenientes con CSS pero después de ver lo de flexbox me quedo un poco mas claro pero no pude solucionar poner mi background completo y la "caja" de la pagina principal se centre verticalmente y tuve que solucionar metiendo saltos de linea, pero la gran duda que tengo es la siguiente, gracias al feedback de Bliss decidí meterle un botón"switch" a base de un checkbox mi pregunta es ¿Se puede meter dos variables en un mismo botón al hacer clic?