Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 02-JS-I/.README.json.swp
Binary file not shown.
14 changes: 8 additions & 6 deletions 02-JS-I/homework/homework.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// En estas primeras 6 preguntas, reemplaza `null` por la respuesta

// Crea una variable "string", puede contener lo que quieras:
const nuevaString = null;
const nuevaString = "Hola";

// Crea una variable numérica, puede ser cualquier número:
const nuevoNum = null;
const nuevoNum = 15;

// Crea una variable booleana:
const nuevoBool = null;
const nuevoBool = false;

// Resuelve el siguiente problema matemático:
const nuevaResta = 10 - null === 5;

// Resuelve el siguiente problema matemático:
const nuevaMultiplicacion = 10 * null === 40 ;
const nuevaMultiplicacion = 10 * 4 === 40 ;

// Resuelve el siguiente problema matemático:
const nuevoModulo = 21 % 5 === null;
const nuevoModulo = 21 % 5 === 1;


// En los próximos 22 problemas, deberás completar la función.
Expand All @@ -28,14 +28,16 @@ const nuevoModulo = 21 % 5 === null;
function devolverString(str) {
// "Return" la string provista: str
// Tu código:
return(str);

}

function suma(x, y) {
// "x" e "y" son números
// Suma "x" e "y" juntos y devuelve el valor
// Tu código:

suma = x + y;
return(suma);
}

function resta(x, y) {
Expand Down