-
Notifications
You must be signed in to change notification settings - Fork 329
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
base: master
Are you sure you want to change the base?
Conversation
index.html
Outdated
<!-- <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> --> | ||
|
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.
no código muerto!
<button id="ingresar"> Ingresar al bar</button> | ||
</form> --> | ||
|
||
<div id="resultado" ></div> |
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.
<div id="resultado" ></div> | |
<div id="resultado"></div> |
tareas/clase-6/pregunta-familiar.js
Outdated
|
||
|
||
|
||
|
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.
demasiados espacios
const $cantidadIntegrantes = document.querySelector("#cantidad-integrantes"); | ||
const cantidadIntegrantes = Number($cantidadIntegrantes.value); |
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.
💯
tareas/clase-6/pregunta-familiar.js
Outdated
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 = ''; | ||
} |
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.
fijate si lo podés hacer más sencillo (por ejemplo ocultarElemento y mostrarElemento y que tomen un elemento como parámetro)
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 este caso, refactorize creando una clase llamada "ocultarElemento(arg)" y "mostrarElemento(arg)", para evitar duplicar codigo, gracias fabricio
tareas/clase-6/pregunta-familiar.js
Outdated
const $div = document.createElement('div'); | ||
$div.className = 'integrante'; |
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 vez de $div ponele $integrante así escribís lo que representa y no el elemento en si
tareas/clase-6/pregunta-familiar.js
Outdated
|
||
} | ||
|
||
// funciones de calculo: |
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.
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){ |
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.
esto no es una prueba unitaria, es una validación
tareas/clase-6/pregunta-familiar.js
Outdated
|
||
function validarCantidadIntegrantes(cantidad){ | ||
|
||
// haciendo expresiones regulares: |
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.
// haciendo expresiones regulares: |
No description provided.