Skip to content

Instantly share code, notes, and snippets.

View JuliaGabellone's full-sized avatar

JuliaGabellone

View GitHub Profile
function hola (nombre){
console.log (nombre);
}
hola ("juls")
.............................................
function tarea (texto){
if(texto == "juls2") {
console.log("ok")
}
else {console.error("mal")}
function juls(texto , numero){
if (typeof(texto)=='string' && isNaN(texto) && texto.length < 25) {
console.log("El texto debe tener mas de 25 caracteres")
}
if (typeof(texto)=='string' && isNaN (texto) && texto.length > 50){
console.log("El texto debe tener menos de 50 caracteres")
}
if (typeof(numero)!='number'){
console.log("Numero dije!")
}
function juls(texto , numero){
if (typeof(texto)=='string') {
}
else {
console.error("Mal!")
}
if (typeof(numero)=='number') {
}
else {
console.error("Feo eso!")
function juls (texto){
if (typeof(texto)!='string'){
return false;
}
else {
console.log("OK")
}
}
juls(3434)
function iguales (text , number){
if (typeof(text)!='string'){
console.error("Ingrese texto")
return false
}
if (typeof(number)!= 'number'){
console.error("Ingrese numero")
return false
}
if (text != number){
function valor (valor , modelo , año){
// solo modelos fiesta y falcon sino "La empresa no trabaja con ese modelo"
if (modelo != "fiesta" && modelo!="falcon"){
console.log("La empresa no trabaja con ese modelo")
return false
}
//menor de 1970 -50%
if ( año < 1970){
resultado = (valor - (50*(valor)/100))
function valor (valor , modelo , año){
if(typeof(modelo)!='string'){
return false
}
if (año > 1990){
resultado = (valor -(10*valor/100))
}
console.log("el valor de su auto" + " " + modelo + " " + año + " " + "es de" + " " + resultado)
return true
}
function valor ( modelo , año , valor){
if (modelo != "fiesta" && modelo != "falcon"){
console.log("La empresa no trabaja con ese modelo")
return false
}
if (typeof(modelo)!='string' || typeof(año)!='number' || typeof(valor)!='number'){
return false
}
if (año < 1970){
resultado = ( valor - (50*valor/100))
function comparar (numero , string){
if (typeof(string)!= 'string' || typeof(numero)!='number'){
return false
}
if (isNaN(string)){
return false
}
if (numero == string){
console.log("Iguales")
return true
// E1
((2 == 3) && ("asdf" > "ASDF") && ( 4/2 == 2)) || (false && true)
(false && true && true ) || false)
false || false
false
// E2
(Math.max(2,3) == 3) && (1+2+3+4+5+6+7+8+9+10 == 55)
true && true
true