Skip to content
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

Primer code review - Fabiola González #23

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

DorsD
Copy link

@DorsD DorsD commented Feb 11, 2020

Para el cipher, generé un archivo llamado pruebas.js que contiene todo lo que he trabajado al respecto. Sin embargo, ya he puesto mi función en el objeto cipher del archivo cipher.js

En HTML solo tengo estructurada la maqueta pero aún faltan estilos de css.

¡Gracias!

Copy link

@HectorBlisS HectorBlisS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tienes un gran progreso, pero es importante poner atención a los detalles cómo poner todo en su lugar para que después no se rompa tu programa al mover cosas importantes al final, hazlo lo antes posible.

src/pruebas.js Outdated
Comment on lines 15 to 19
var letterOriginal= inputText.charAt(i);
var letter = letterOriginal.toUpperCase();
var letterCode = letter.charCodeAt();
var letterCodeNumber = parseInt(letterCode);
if(letterCodeNumber == 32){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es importante cambiar var por let o const (la mayoría pide const aunque no hay gran diferencia entre let y const es un debate) pero var compromete tu código, ya no lo uses.

src/pruebas.js Outdated
}else{
codeNumberCiphered = (letterCodeNumber-65+offset)%26+65;
}
var cipheredLetter = String.fromCharCode(codeNumberCiphered);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let

codeNumberCiphered = (letterCodeNumber-65+offset)%26+65;
}
var cipheredLetter = String.fromCharCode(codeNumberCiphered);
console.log(letter+" "+letterCode+" "+codeNumberCiphered+" "+cipheredLetter);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

de preferencia crea una variable que almacene todo esto y despues solo le das al console log la variable

src/style.css Outdated
background-color: #2196F3;
}

input:focus + .slider {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto es muy específico y está bien, pero puede fallar, mejor usa el selector de descendente (espacio) en vez del + para que sea más seguro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants