Skip to content

Primer code review - Fabiola González#23

Open
DorsD wants to merge 34 commits intoLaboratoria:masterfrom
DorsD:master
Open

Primer code review - Fabiola González#23
DorsD wants to merge 34 commits intoLaboratoria:masterfrom
DorsD:master

Conversation

@DorsD
Copy link
Copy Markdown

@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
Copy Markdown

@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){
Copy link
Copy Markdown

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);
Copy link
Copy Markdown

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);
Copy link
Copy Markdown

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 {
Copy link
Copy Markdown

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