This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hola (nombre){ | |
console.log (nombre); | |
} | |
hola ("juls") | |
............................................. | |
function tarea (texto){ | |
if(texto == "juls2") { | |
console.log("ok") | |
} | |
else {console.error("mal")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function juls(texto , numero){ | |
if (typeof(texto)=='string') { | |
} | |
else { | |
console.error("Mal!") | |
} | |
if (typeof(numero)=='number') { | |
} | |
else { | |
console.error("Feo eso!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function juls (texto){ | |
if (typeof(texto)!='string'){ | |
return false; | |
} | |
else { | |
console.log("OK") | |
} | |
} | |
juls(3434) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
OlderNewer