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

solución a la tarea 6, parte 1 #110

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

Conversation

n0g4y0
Copy link

@n0g4y0 n0g4y0 commented Dec 30, 2022

No description provided.

index.html Outdated
Comment on lines 14 to 19
<!-- <form id="form">
<input type="text" placeholder="Ingresa tu nombre" id="nombre-usuario">
<input type="number" placeholder="Ingresa tu edad" id="edad-usuario">
<button id="ingresar"> Ingresar al bar</button>
</form> -->

Copy link
Contributor

Choose a reason for hiding this comment

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

no código muerto!

<button id="ingresar"> Ingresar al bar</button>
</form> -->

<div id="resultado" ></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div id="resultado" ></div>
<div id="resultado"></div>

Comment on lines 9 to 12




Copy link
Contributor

Choose a reason for hiding this comment

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

demasiados espacios

Comment on lines +3 to +4
const $cantidadIntegrantes = document.querySelector("#cantidad-integrantes");
const cantidadIntegrantes = Number($cantidadIntegrantes.value);
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Comment on lines 59 to 72
function mostrarBotonCalcular() {
document.querySelector('#calcular').className = '';
}
function ocultarBotonCalculo() {
document.querySelector('#calcular').className = 'oculto';
}

function ocultarResultados() {
document.querySelector('#analisis').className = 'oculto';
}

function mostrarResultados() {
document.querySelector('#analisis').className = '';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

fijate si lo podés hacer más sencillo (por ejemplo ocultarElemento y mostrarElemento y que tomen un elemento como parámetro)

Copy link
Author

Choose a reason for hiding this comment

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

en este caso, refactorize creando una clase llamada "ocultarElemento(arg)" y "mostrarElemento(arg)", para evitar duplicar codigo, gracias fabricio

Comment on lines 84 to 85
const $div = document.createElement('div');
$div.className = 'integrante';
Copy link
Contributor

Choose a reason for hiding this comment

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

en vez de $div ponele $integrante así escribís lo que representa y no el elemento en si


}

// funciones de calculo:
Copy link
Contributor

Choose a reason for hiding this comment

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

no pongas comentarios que no sirven, si querés separar las funciones de cálculo ponelas en otro archivo en vez de separarlas con un comentario

// pruebas unitarias:


function validarCantidadIntegrantes(cantidad){
Copy link
Contributor

Choose a reason for hiding this comment

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

esto no es una prueba unitaria, es una validación


function validarCantidadIntegrantes(cantidad){

// haciendo expresiones regulares:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// haciendo expresiones regulares:

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