Skip to content

preparando para o review#1

Open
sidneyouteiro wants to merge 1 commit into
jefranca:mainfrom
sidneyouteiro:review
Open

preparando para o review#1
sidneyouteiro wants to merge 1 commit into
jefranca:mainfrom
sidneyouteiro:review

Conversation

@sidneyouteiro

Copy link
Copy Markdown

No description provided.

@sidneyouteiro sidneyouteiro left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fala Jean! Trouxe um feedback de código do seu último projeto 🙂

Eu gostei bastante das soluções que você desenvolveu ao longo do projeto,
só tenho a acrescentar algumas coisas quanto a semântica e versionamento.

Para próximos projetos aconselho mensagens de commits mais descritivos e adotar convenções para nomear funções e variáveis.

Bom trabalho!

Comment thread javscript.js
Comment on lines -13 to -26
cartas[0]= '<img src="images/bobrossparrot.gif">';
cartas[2]= '<img src="images/explodyparrot.gif"> ';
cartas[4]= '<img src="images/fiestaparrot.gif"> ';
cartas[6]= '<img src="images/metalparrot.gif"> ';
cartas[8]= '<img src="images/revertitparrot.gif"> ';
cartas[10]= '<img src="images/tripletsparrot.gif"> ';
cartas[12]= '<img src="images/unicornparrot.gif">';
cartas[1]= '<img src="images/bobrossparrot.gif">';
cartas[3]= '<img src="images/explodyparrot.gif"> ';
cartas[5]= '<img src="images/fiestaparrot.gif"> ';
cartas[7]= '<img src="images/metalparrot.gif"> ';
cartas[9]= '<img src="images/revertitparrot.gif"> ';
cartas[11]= '<img src="images/tripletsparrot.gif"> ';
cartas[13]= '<img src="images/unicornparrot.gif">';

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Poderíamos armazenar apenas o nome do gif no array de cartas tendo em vista que é o único trecho que varia. Assim reduziria a quantidade de código duplicado.

Comment thread javscript.js



function sortearcartas(){

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

É uma boa prática utilizarmos convenções de nomes de funções. Na Driven, utilizamos bastante o camelCase. Exemplo:
function sortearCartas(){ ... }

Comment thread javscript.js
Comment on lines -1 to -6
let qtdCartas = Number(prompt("Com quantas cartas deseja jogar?"));
let numerodejogadas=0;
let cartas = [];
let cartassorteadas = [];
let verificar = [];
let acertos = 0;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

É uma boa prática utilizarmos convenções de nomes de variaveis. Na Driven, utilizamos bastante o camelCase. Exemplo:
let cartasSorteadas = [];

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.

1 participant