Skip to content
Merged
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
6 changes: 3 additions & 3 deletions exercises/08.2-Count-On/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

As you saw in the last exercise your array can be a mix types of data.

## :pencil: Instructions
## :pencil: Instrucciones:

1. Add all the items with data-type object into the `hello` array.

Expand All @@ -17,12 +17,12 @@ for(let index = 0; index < myArray.length; index++){
}
```

## :bulb: Hint
## :bulb: Hint:

+ Loop the given array.

+ Add a condition inside the loop that checks for the item to be an object.

+ If the item is an object, added to the `hello` array.

+ Console log the array hello.
+ Console log the array `hello`.
26 changes: 17 additions & 9 deletions exercises/08.3-Sum-all-items/README.es.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# `08.3` Sum All Items
# `08.3` Suma todos los elementos

Usando el bucle (loop) for, complete el código de la función `sum` para que devuelva la suma de todos los elementos en un arreglo dado, por ejemplo:
## :pencil: Instrucciones:


1. Usando un bucle (loop) `for`, completa el código de la función `sum` para que devuelva la suma de todos los elementos en un arregloarrayy dado, por ejemplo:

```js
console.log(sumTheElements([2,13,34,5]))
//this should print 54
//el resultado debiese ser 54
```

El resultado debe ser 925960
### Resultado esperado:

925960

# :bulb: Pista:

+ Inicializa una variable `total` en 0.

+ Recorre todo el arreglo.

# :bulb: Pista
+ En cada bucle, agrega el valor de cada elemento en la variable `total`.

1. Inicialice una variable `total` en 0.
2. Recorre todo el arreglo.
3. En cada bucle, agregue el valor de cada elemento en la variable `total`.
4. Devuelve la variable total (fuera del bucle pero dentro de la función).
+ Devuelve la variable `total` (fuera del bucle pero dentro de la función).
21 changes: 14 additions & 7 deletions exercises/08.3-Sum-all-items/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# `08.3` Sum All Items

Using a for loop, complete the code of the function `sum` so that it returns the sum of all the items in a given array, for example:
## :pencil: Instructions:

Using a `for` loop, complete the code of the function `sum` so that it returns the sum of all the items in a given array, for example:

```js
console.log(sumTheElements([2,13,34,5]))
//this should print 54
```

The result should be 925960
### Expected result:

925960

# :bulb: Hint:

+ Initilize a variable `total` at 0.

+ Loop the entire array.

# :bulb: Hint
+ On every loop add the value of each item into the `total` variable.

1. Initilize a variable `total` at 0.
2. Loop the entire array.
3. On every loop add the value of each item into the `total` variable.
4. Return the total variable (outside of the loop but inside of the function).
+ Return the `total` variable (outside of the loop but inside of the function).
26 changes: 26 additions & 0 deletions exercises/09-forEach-loop/README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# `09.1` Bucle/loop forEach

En lugar de usar la clásica declaración `for`, hay una nueva forma de recorrer los arreglos: [ higher order functions (funciones de orden superior) ](https://www.youtube.com/watch?v=rRgD1yVwIvE)

Es posible recorrer un arreglo usando la función `array.forEach`. Debes especificar qué hacer en cada iteración del bucle.

```js
myArray.forEach(function(item, index, arr){

});
/**
* item: valor del elemento específico (requerido).
* index: índice del elemento (opcional).
* arr: objeto array al cual pertenece el elemento (opcional).
*/
```

## :pencil: Instrucciones:

En este momento, el código está imprimiendo todos los elementos en el arreglo o array:

1. Cambia el código de la función para imprimir solo los números divisibles por 14.

## :bulb: Pista:

Un número X es divisible por 2 si: (X%2===0)
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ Instead of using the classic `for` statement, there is a new way to loop arrays
It is possible to loop an array using the `array.forEach` function. You have to specify what to do on each iteration of the loop.

```js
/**
* item: will be the value of the specific item.
* index: will be the item index.
* arr: will be the
*/
myArray.forEach(function(item, index, arr){

});
/**
* item: will be the value of the specific item (required).
* index: will be the item index(optional).
* arr: will be the array object to which the element belongs to (opcional).
*/


```

# :pencil: Instructions
## :pencil: Instructions:

Right now, the code is printing all the items in the array:

Right now, the code is printing all the items in the array. Please change the function code to print only the numbers divisible by 14.
1. Please change the function code to print only the numbers divisible by 14.

## :bulb: HINT
## :bulb: Hint:

A number X is divisible by 2 if: (X%2===0)
File renamed without changes.
24 changes: 0 additions & 24 deletions exercises/09.1-forEach-loop/README.es.md

This file was deleted.

13 changes: 13 additions & 0 deletions exercises/10-Everything-is-awesome/README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `10` Todo es increíble

## 📝 Instrucciones:

1. Compara el elemento. Si es `1`, pone el número en el arreglo `return_array`.

2. Compara el elemento si es `0`, pone "Yahoo" en el arreglo o array `return_array` (en lugar del número)

Ejemplo de la salida para [0,0,1,1,0]:

```bash
['Yahoo','Yahoo','1','1','Yahoo']
```
13 changes: 13 additions & 0 deletions exercises/10-Everything-is-awesome/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `10` Everything is awesome

# 📝 Instructions:

1. Compare the item. If it is `1` push the number to the array `return_array`.

2. Compare the item if it is 0 push "Yahoo" to the array `return_array` (instead of the number)

Example output for [0,0,1,1,0]:

```bash
['Yahoo','Yahoo','1','1','Yahoo']
```
13 changes: 0 additions & 13 deletions exercises/10.1-Everything-is-awesome/README.es.md

This file was deleted.

13 changes: 0 additions & 13 deletions exercises/10.1-Everything-is-awesome/README.md

This file was deleted.

21 changes: 11 additions & 10 deletions exercises/11-Do-while/README.es.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# `11` DO DO DO

El do{}while(); es otro ejemplo de bucle(loop) en javascript que se usa con menos frecuencia pero es un bucle
El `do{}while()`; es otro ejemplo de bucle(loop) en javascript que se usa con menos frecuencia pero es un bucle.

```js
// stating value for the loop:
// declarando el valor para el loop o bucle:
let i = 0;

// the loop will do everything inside of the do code block
// el loop hará todo dentro del bloque de código
do {
// print out the i value
// imprime el valor de i
console.log(i)
// increase the i value
// aumenta el valor de i
i++
// evaluate the value
// evalúa el valor de i
} while (i < 5);
```

# 📝 Instrucciones
## 📝 Instrucciones:

Imprima cada número de iteración en la consola del 20 al 0, pero concatene un signo de exclamación a la salida si el número es un multiplo de 5
Al final console.log () "LIFTOFF"
1. Imprime cada número de la iteración en la consola del 20 al 0, pero concaténale un signo de exclamación(`!`) al elemento si el número es un multiplo de 5.

Example Output on the console:
2. Al final haz un `console.log()`de "LIFTOFF"

### Resultado esperado:

```md
20!
Expand Down
13 changes: 7 additions & 6 deletions exercises/11-Do-while/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `11` DO DO DO

The do{}while(); is another loop example in javascript is less commonly used but it is a loop
The `do{}while()`; is another loop example in javascript is less commonly used but it is a loop.

```js
// stating value for the loop:
Expand All @@ -12,16 +12,17 @@ do {
console.log(i)
// increase the i value
i++
// evaluate the value
// evaluate the value of i
} while (i < 5);
```

# 📝 Instructions
## 📝 Instructions:

Print every iteration number on the console from 20 to 0 but concatenate an exclamation point to the output if the number is a module of 5
At the end console.log() "LIFTOFF"
1. Print every iteration number on the console from 20 to 0 but concatenate an exclamation point to the output if the number is a module of 5.

Example Output on the console:
2. At the end `console.log()`de LIFTOFF"

### Expected result:

```md
20!
Expand Down
19 changes: 16 additions & 3 deletions exercises/12-Delete-element/README.es.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
La única forma de eliminar a Daniella del arreglo (sin hacer trampa) será crear un nuevo arreglo con todas las demás personas, excepto Daniella.
# `12` Eliminar el elemento

Instrucciones
Crea una función deletePerson que elimine a cualquier persona del arreglo y devuelve un nuevo arreglo sin esa persona.
La única forma de eliminar a `Daniella` del array o arreglo (sin hacer trampa) será crear un nuevo arreglo con todas las demás personas, excepto Daniella.

## 📝Instrucciones:

1. Crea una función `deletePerson` que elimine a cualquier persona del arreglo y devuelva un nuevo arreglo sin esa persona.

### Resultado esperado:


```js

['juan', 'ana', 'michelle', 'stefany', 'lucy', 'barak']
['ana', 'michelle', 'daniella', 'stefany', 'lucy', 'barak']
['juan', 'ana', 'michelle', 'daniella', 'stefany', 'lucy', 'barak']
```
12 changes: 6 additions & 6 deletions exercises/12-Delete-element/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# `12` Delete element

The only way to delete `Daniella` from the list (without cheating)
will be to create a new list with all the other people but Daniella.
The only way to delete `Daniella` from the array (without cheating) will be to create a new list with all the other people but Daniella.

# 📝Instructions
1. Please create a `deletePerson` function that deletes any given person from the list
and returns a new list without that person.
## 📝Instructions:

1. Please create a `deletePerson` function that deletes any given person from the array and returns a new array without that person.

### Expected result:

```js
Result:

['juan', 'ana', 'michelle', 'stefany', 'lucy', 'barak']
['ana', 'michelle', 'daniella', 'stefany', 'lucy', 'barak']
['juan', 'ana', 'michelle', 'daniella', 'stefany', 'lucy', 'barak']
Expand Down
21 changes: 16 additions & 5 deletions exercises/13-Merge-arrays/README.es.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
Como vivimos en un mundo nuevo, no debería haber colores ni etiquetas, ¿verdad?
# `13` Merge array:

Instrucciones
Escribe una función que combine dos arreglos y retorne un único arreglo nuevo que combine todos los valores de ambos arreglos.
Como vivimos en un mundo nuevo, no debería haber colores ni etiquetas, ¿cierto?

Pista:
Tendrás que recorrer cada arreglo e insertar sus elementos en un nuevo arreglo.
## 📝Instrucciones:

1. Escribe una función que combine dos arreglos y retorne un único arreglo nuevo que combine todos los valores de ambos arreglos.

### Resultado esperado:

```js

['Lebron', 'Aaliyah', 'Diamond', 'Dominique', 'Aliyah', 'Jazmin', 'Darnell', 'Lucas', 'Jake', 'Scott', 'Amy', 'Molly', 'Hannah', 'Lucas']
```

### 💡 Pista:

+ Tendrás que recorrer cada arreglo e insertar sus elementos en un nuevo arreglo.
Loading