Skip to content

Commit 24ae981

Browse files
authored
Merge branch 'master' into master
2 parents 72cdcba + 893d0bd commit 24ae981

File tree

210 files changed

+1165
-1049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+1165
-1049
lines changed

.learn/assets/exercises-menu.png

10.4 KB
Loading

README.es.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- hide -->
66
<a href="https://www.4geeksacademy.co"><img height="280" align="right" src="https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial/blob/master/badge-loop.png"></a>
77

8-
> Por [@alesanchezr](https://twitter.com/alesanchezr) y [otros colaboradores](https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial/graphs/contributors) at [4Geeks Academy](https://4geeksacademy.co/)
8+
> Por [@alesanchezr](https://twitter.com/alesanchezr) y [otros colaboradores](https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial/graphs/contributors) de [4Geeks Academy](https://4geeksacademy.co/)
99
1010
![last commit](https://img.shields.io/github/last-commit/4geeksacademy/javascript-arrays-exercises-tutorial)
1111
[![build by developers](https://img.shields.io/badge/build_by-Developers-blue)](https://breatheco.de)
@@ -30,7 +30,7 @@
3030

3131
Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/javascript-arrays-exercises-tutorial) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial).
3232

33-
> Una vez ya tengas abirto VSCode los ejercicios de LearnPack deberían empezar automáticamente, si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start`
33+
> Una vez ya tengas abierto VSCode los ejercicios de LearnPack deberían empezar automáticamente, si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start`
3434
3535
## Instalación local
3636

@@ -43,23 +43,14 @@ $ npm i learnpack -g
4343
$ learnpack plugins:install learnpack-node
4444
```
4545

46-
2. Descarga este ejercicio en particular usando LearnPack y navega con `cd` para acceder a la carpeta:
47-
48-
```bash
49-
$ learnpack download javascript-arrays-exercises
50-
$ cd javascript-arrays-exercises
51-
```
52-
53-
> Nota: Cuando termines de descargar, encontrarás la carpeta "exercises" que contiene los ejercicios.
54-
55-
3. Inicia el tutorial/ejercicios ejecutando el siguiente comando en el mismo nivel donde se encuentra tu archivo learn.json:
46+
2. Inicia el tutorial/ejercicios ejecutando el siguiente comando en el mismo nivel donde se encuentra tu archivo learn.json:
5647

5748
```bash
5849
$ npm i jest@24.8.0 -g
5950
$ learnpack start
6051
```
61-
<!-- endhide -->
6252

53+
<!-- endhide -->
6354

6455
## ¿Cómo están organizados los ejercicios?
6556

@@ -69,15 +60,15 @@ Cada ejercicio es una pequeña aplicación de React que contiene los siguientes
6960
2. **README.md**: Contiene las instrucciones de ejercicio.
7061
3. **test.js**: Contiene el script del test para el ejercicio (no es necesario que abras este archivo).
7162

72-
> Nota: Los ejercicios son autograduados pero son bastante rígidos y estrictos, mi recomendación es que ignores los tests y los uses solo como una recomendación, sino pueden frustrarte.
63+
> Nota: Estos ejercicios tienen calificación automática. Los tests son muy rígidos y estrictos, mi recomendación es que no prestes demasiada atención a los tests y los uses solo como una sugerencia o podrías frustrarte.
7364
7465
## Colaboradores
7566

7667
Gracias a estas maravillosas personas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
7768

7869
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 🤓 (build-tutorial) ✅ (documentación) 📖
7970

80-
2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador), (traducción) 🌎
71+
2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador) 💻, (traducción) 🌎
8172

8273
Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas!
8374

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ Dozens of looping exercises to sharpen your looping skills with for, forEach, ma
2525
<li><a href="https://github.com/4GeeksAcademy/master-javascript-programming-exercises">Master JavaScript</a></li>
2626
</ol>
2727

28-
> We need you! These exercises are built and maintained in collaboration with contributors such as yourself. If you find any bugs or misspellings please contribute and/or report them.
28+
> We need you! These exercises are built and maintained in collaboration with contributors such as yourself. If you find any bugs or misspellings, please contribute and/or report them.
2929
3030

3131
## One click installation (recommended):
3232

3333
You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/javascript-arrays-exercises-tutorial) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial).
3434

35-
> Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start`
35+
> Once you have opened VSCode, the LearnPack exercises should start automatically. If exercises don't run automatically, you can try typing on your terminal: `$ learnpack start`
3636
3737
## Local Installation
3838

@@ -45,16 +45,7 @@ $ npm i learnpack -g
4545
$ learnpack plugins:install learnpack-node
4646
```
4747

48-
2. Download this particular exercise using LearnPack and navigate with `cd` into the folder:
49-
50-
```bash
51-
$ learnpack download javascript-arrays-exercises
52-
$ cd javascript-arrays-exercises
53-
```
54-
55-
> Note: Once you finish downloading, you will find an "exercises" folder that contains all the exercises within.
56-
57-
3. Start the tutorial/exercises by running the following command at the same level where your learn.json file is:
48+
2. Start the tutorial/exercises by running the following command at the same level where your learn.json file is:
5849

5950
```bash
6051
$ npm i jest@24.8.0 -g
@@ -79,7 +70,7 @@ Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-
7970

8071
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 👀 (build-tutorial) ✅ (documentation) 📖
8172

82-
2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, contribution: (coder), (translation) 🌎
73+
2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎
8374

8475
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
8576

exercises/00-Welcome/README.es.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ intro: https://www.youtube.com/watch?v=ooHdelGf0gI
55

66
# Bienvenido a los Loops
77

8-
Practicaremos los bucles o loops en javascript hasta que te sientas cómodo con ellos.
8+
Practicaremos los bucles o loops en JavaScript hasta que te sientas cómodo con ellos.
99

1010
Te recomendamos ver el siguiente [video sobre loops o bucles](https://www.youtube.com/watch?v=U3ZlQSOcOI0) antes de empezar. Nos centraremos en:
1111

@@ -21,18 +21,12 @@ Te recomendamos ver el siguiente [video sobre loops o bucles](https://www.youtub
2121

2222
6. find.
2323

24-
7. Diccionario de bucles (objetos literales).
24+
7. bucles en objetos literales.
2525

2626
Haz clic en `next →` cuando estés listo para iniciar los ejercicios.
2727

2828

2929
***
30-
Si necesitas ir a un ejercicio en particular puedes seleccionar en el menu superior.
31-
32-
<p align="center">
33-
<img src="./menu.png">
34-
</p>
35-
Y seleccionar el ejercicio
36-
<p align="center">
37-
<img src="./menu2.png">
38-
</p>
30+
Si necesitas ir a un ejercicio en particular, puedes acceder en el menú superior y seleccionar el ejercicio.
31+
32+
![menú de ejercicios](../../.learn/assets/exercises-menu.png?raw=true)

exercises/00-Welcome/README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ intro: https://www.youtube.com/watch?v=ooHdelGf0gI
55

66
# Welcome to Loops
77

8-
Practice loops in javascript until you become confortable with it.
8+
Practice using loops in JavaScript until you feel confident with them.
99

10-
We recomend you watching [this short video about loops](https://www.youtube.com/watch?v=U3ZlQSOcOI0) before starting. We will focus on:
10+
We recommend you to watch [this short video about loops](https://www.youtube.com/watch?v=U3ZlQSOcOI0) before starting. We will focus on:
1111

1212
1. For loop.
1313

@@ -21,17 +21,11 @@ We recomend you watching [this short video about loops](https://www.youtube.com/
2121

2222
6. find.
2323

24-
7. Loop dictionaries (object literals).
24+
7. Loop object literals.
2525

2626
Click `next →` when you are ready to start the exercises.
2727

2828
***
29-
If you need to go to a specific exercise you may select the top menu
30-
31-
<p align="center">
32-
<img src="./menu.png">
33-
</p>
34-
And select the exercise
35-
<p align="center">
36-
<img src="./menu2.png">
37-
</p>
29+
If you need to go to a specific exercise, you may select the top menu and select the exercise.
30+
31+
![exercises menu](../../.learn/assets/exercises-menu.png?raw=true)

exercises/01-Hello_World/README.es.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# `01` Hello World
22

3-
En JavaScript, usamos `console.log` para hacer que la computadora escriba lo que queramos (el contenido de una variable, una cadena dada, etc.) en algo llamado `la consola`.
3+
En JavaScript, usamos `console.log()` para hacer que la computadora escriba lo que queramos (el contenido de una variable, una cadena de caracteres, etc.) en algo llamado **la consola**.
44

55
Cada lenguaje de programación tiene una consola, ya que era la única forma de interactuar con los usuarios al principio (antes de que llegaran Windows o MacOS).
66

7-
Hoy, la impresión en la consola se usa principalmente como una herramienta de monitoreo, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa.
7+
Hoy en día, imprimir en la consola se usa principalmente como una herramienta de monitoreo, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa.
88

99
Este es un ejemplo de cómo usarlo:
1010

@@ -14,7 +14,7 @@ console.log("How are you?");
1414

1515
## 📝 Instrucciones:
1616

17-
1. Usa `console.log` para imprimir "Hello World" en la consola. Siéntete libre de probar otras cosas también.
17+
1. Usa `console.log()` para imprimir "Hello World" en la consola. Siéntete libre de probar otras cosas también.
1818

1919
## 💡 Pista:
2020

exercises/01-Hello_World/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ tutorial: https://www.youtube.com/watch?v=miBzmGgMIbU
44

55
# `01` Hello World
66

7-
In JavaScript, we use `console.log` to make the computer write anything we want (the content of a variable, a given string, etc.) in something called `the console`.
7+
In JavaScript, we use `console.log()` to make the computer write anything we want (the content of a variable, a given string, etc.) in something called **the console**.
88

9-
Every language has a console, as it was the only way to interact with the users at the beginning (before the Windows or MacOS arrived).
9+
Every language has a console, as it was the only way to interact with the users at the beginning (before Windows or MacOS arrived).
1010

11-
Today, printing in the console is used mostly as a monitoring tool, ideal to leave a trace of the content of variables during the program execution.
11+
Today, printing in the console is mostly used as a monitoring tool, ideal for leaving a trace of the content of variables during program execution.
1212

1313
This is an example of how to use it:
1414

@@ -18,8 +18,8 @@ console.log("How are you?");
1818

1919
## 📝 Instructions:
2020

21-
1. Use console.log to print "Hello World" on the console. Feel free to try other things as well.
21+
1. Use `console.log()` to print "Hello World" on the console. Feel free to try other things as well.
2222

2323
## 💡 Hint:
2424

25-
+ 5 minutes video about the console: https://www.youtube.com/watch?v=1RlkftxAo-M
25+
+ 5 minute video about the console: https://www.youtube.com/watch?v=1RlkftxAo-M

exercises/01-Hello_World/tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let _log = console.log;
1111
// We make the text lower case to make it case insensitive
1212
global.console.log = console.log = jest.fn((text) => _buffer += text.toLowerCase() + "\n");
1313

14-
test('console.log() function should be called with Hello World', function () {
14+
test('console.log() function should be called with "Hello World"', function () {
1515

1616
/*
1717
Here is how to mock the alert function:

exercises/02.1-Access_and_retrieve/README.es.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ let myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','satu
1010

1111
Cada array tiene las siguientes partes:
1212

13-
- *Item*s*: son los valores reales dentro de cada posición del array (array).
13+
- **Items** (Elementos): son los valores dentro de cada posición del array.
1414

15-
- *Length* (Longitud): es el tamaño del array, el número de elementos.
15+
- **Length** (Longitud): es el tamaño del array, el número de elementos.
1616

17-
- *Index* (indice): es la posición de un elemento.
17+
- **Index** (Índice): es la posición de un elemento.
1818

1919
![Como funciona un array](../../.learn/assets/DbmSOHT.png?raw=true)
2020

21-
Para acceder a cualquier elemento en particular dentro de un array (array) debes conocer su índice (posición). El índice o index es un valor entero que representa la posición en la que se encuentra el elemento.
21+
Para acceder a cualquier elemento en particular dentro de un array debes conocer su índice (posición). El índice o index es un valor entero que representa la posición en la que se encuentra el elemento.
2222

23-
**!IMPORTANTE: ¡Cada array comienza desde cero (0)!**
23+
**IMPORTANTE: ¡Cada array comienza desde cero (0)!**
2424

25-
## 📝 Instrucciones
25+
## 📝 Instrucciones:
2626

27-
1. Usando la función `console.log`, imprime el tercer elemento del array.
27+
1. Usando la función `console.log()`, imprime el tercer elemento del array.
2828

29-
2. Cambia el valor en la posición donde se encuentra `jueves` a `null` (nulo).
29+
2. Cambia el valor en la posición donde se encuentra `thursday` a `null`.
3030

31-
3. Imprime esa posición en particular.
31+
3. Imprime esa posición.
3232

3333
## 💡 Pista:
3434

35-
+ Usa `null` como valor y no como un string.
35+
+ Usa `null` como valor y no como un string.

exercises/02.1-Access_and_retrieve/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,31 @@ tutorial: https://www.youtube.com/watch?v=9-yAzjsWXtU
44

55
# `02.1` Access and Retrieve
66

7-
Arrays are part of every programming language. They are the way to go when you want to have a "list of elements."
7+
Arrays are part of every programming language. They are the way to go when you want to have a "list of elements".
88

99
For example, we could have an array that stores the days of the week:
1010

1111
```js
1212
let myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];
1313
```
14+
1415
Every array has the following parts:
1516

16-
- *Items*: are the actual values inside on each position of the array.
17+
- **Items**: are the actual values inside each position of the array.
1718

18-
- *Length*: is the size of the array, the number of items.
19+
- **Length**: is the size of the array, the number of items.
1920

20-
- *Index*: is the position of an element.
21+
- **Index**: is the position of an element (item).
2122

2223
![How arrays work](../../.learn/assets/DbmSOHT.png?raw=true)
2324

2425
To access any item within the array you need to know its index (position). The index is an integer value that represents the position in which the element is located.
2526

2627
**IMPORTANT: Every array starts from zero (0)!**
2728

28-
## 📝 Instructions
29+
## 📝 Instructions:
2930

30-
1. Using the `console.log` function, print the 3rd item from the array.
31+
1. Using the `console.log()` function, print the 3rd item from the array.
3132

3233
2. Change the value in the position where `thursday` is located to `null`.
3334

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//declaring the array
1+
// Declaring the array
22
let myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];
33

4-
//1. print the item here
4+
// 1. print the 3rd item here
55

6-
//2. change 'thursday'a value here to null
6+
// 2. change the 'thursday' value to null here
77

8-
//3. print the position of step 2
8+
// 3. print the position of step 2
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
//declaring the array
1+
// Declaring the array
22

3-
//. 0. 1. 2. 3. 4. 5. 6
3+
//. positions: 0 1 2 3 4 5 6
44
let myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];
55

66

7-
//1. print the item here
8-
console.log(myArray[2])
7+
// 1. print the 3rd item here
8+
console.log(myArray[2]);
99

10-
//2. change 'thursday'a value here to null
10+
// 2. change 'thursday' value to null here
1111
myArray[4] = null;
1212

13-
//3. print the position of step 2
14-
console.log(myArray[4])
13+
// 3. print the position of step 2
14+
console.log(myArray[4]);

exercises/02.1-Access_and_retrieve/tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ it('console.log() function should have been called 2 times', function () {
2020
expect(console.log.mock.calls.length).toBe(2);
2121
});
2222

23-
it('Print the third item on the array (position 2)', function () {
23+
it('Print the 3rd item of the array (position 2)', function () {
2424
//You can also compare the entire console buffer (if there have been several console.log calls on the exercise)
2525
expect(_buffer.includes("tuesday\n")).toBe(true);
2626
});
@@ -29,7 +29,7 @@ it('The fourth item in the array must be equal to "null"' , function(){
2929
expect(myArray[4]).toBe(null)
3030
})
3131

32-
it('Print the 4th position of the array', function () {
32+
it('Print the 4th position of the array (item 5)', function () {
3333
//You can also compare the entire console buffer (if there have been several console.log calls on the exercise)
3434
expect(_buffer.includes("null\n")).toBe(true);
35-
});
35+
});
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# `02.2` Retrieve Items
22

3-
La única forma de acceder a un elemento particular en un arreglo es usando un índice. Un **índice (index)** es un número entero que representa la posición a la que desea acceder en el arreglo.
3+
La única forma de acceder a un elemento particular en un arreglo es usando el índice. El **índice (index)** es un número entero que representa la posición a la que desea acceder en el arreglo.
44

55
Debes envolver el índice entre corchetes de esta manera:
66

77
```js
88
let myValue = array[index];
99
```
1010

11-
## 📝 Instrucciones
11+
## 📝 Instrucciones:
1212

13-
1. Imprima en la consola el 1er elemento de array o arreglo.
13+
1. Imprima en la consola el 1er elemento del array.
1414

15-
2. Imprima en la consola el 4to elemento de la arreglo o array.
15+
2. Imprima en la consola el 4to elemento del array.

0 commit comments

Comments
 (0)