-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ElviraQDP/master
ready til ex 21
- Loading branch information
Showing
98 changed files
with
884 additions
and
610 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ FROM gitpod/workspace-full:latest | |
USER gitpod | ||
|
||
RUN npm i [email protected] -g | ||
RUN npm i learnpack -g && learnpack plugins:install [email protected].13 | ||
RUN npm i learnpack@0.0.88 -g && learnpack plugins:install [email protected].17 |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
# `03.1` Access and Retrive | ||
|
||
Las matrices (arreglos) son parte de cada lenguaje de programación. Son el camino a seguir cuando desea tener una "lista de elementos". | ||
Los arrays (arreglos) son parte de todo lenguaje de programación. Son el camino a seguir cuando quieres tener una "lista de elementos". | ||
|
||
Por ejemplo, podríamos tener un arreglo (array) que almacena los días de la semana: | ||
|
||
Por ejemplo, podríamos tener un arreglo que almacena los días de la semana: | ||
```js | ||
var myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']; | ||
``` | ||
Cada arreglo tiene las siguientes partes: | ||
- Items: son los valores reales dentro de cada posición del arreglo. | ||
|
||
- Items: son los valores reales dentro de cada posición del arreglo (array). | ||
|
||
- Length (Longitud): es el tamaño del arreglo, el número de elementos. | ||
|
||
- Index (indice): es la posición de un elemento. | ||
|
||
![Como funciona un arreglo](https://github.com/4GeeksAcademy/javascript-arrays-exercises-tutorial/blob/5e6a9b1276ed2b7de1b9bb0240105983c170611c/.learn/assets/DbmSOHT.png?raw=true) | ||
|
||
Para acceder a cualquier elemento en particular dentro del arreglo, necesitas conocer su índice (posición). El índice es un valor entero que representa la posición en la que se encuentra el elemento. Acotación: ¡Cada arreglo comienza desde cero (0)! | ||
Para acceder a cualquier elemento en particular dentro del arreglo (array) debes conocer su índice (posición. El índice es un valor entero que representa la posición en la que se encuentra el elemento. | ||
|
||
**IMPORTANTE: ¡Cada arreglo comienza desde cero (0)!** | ||
|
||
# 📝 Instrucciones | ||
|
||
1. Usando la función `console.log`, imprima el tercer elemento del arreglo. | ||
2. Cambia el valor en la posición donde se encuentra `jueves` a nulo. | ||
1. Usando la función `console.log`, imprime el tercer elemento del arreglo. | ||
|
||
2. Cambia el valor en la posición donde se encuentra `jueves` a `null`(nulo). | ||
|
||
3. Imprime esa posición en particular. | ||
|
||
```txt | ||
⚠️ Nota Importante: Use null como valor y no "null" como un string. | ||
``` | ||
|
||
### :bulb: Pista: | ||
|
||
Usa null como valor y no "null" como un string. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# `03.2` Retrieve Items | ||
|
||
La única forma de acceder a un elemento particular en un arreglo es usando un índice. Un índice es un número entero que representa la posición a la que desea acceder en el arreglo. | ||
La única forma de acceder a un elemento particular en un arreglo es usando un índice. Un índice es un `número` entero que representa la posición a la que desea acceder en el arreglo. | ||
|
||
Debes envolver el índice entre corchetes de esta manera: | ||
|
||
Necesita envolver el índice entre corchetes de esta manera: | ||
```js | ||
var myValue = array[index]; | ||
``` | ||
|
||
# 📝 Instrucciones | ||
|
||
1. Imprima en la consola el 1er elemento de la matriz | ||
2. Imprima en la consola el 4to elemento de la matriz | ||
1. Imprima en la consola el 1er elemento de array o arreglo. | ||
|
||
2. Imprima en la consola el 4to elemento de la arreglo o array. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# `04.1` Print the last one | ||
|
||
Nunca sabrás cuántos elementos tiene `myStupidArray` porque se genera aleatoriamente durante el tiempo de ejecución utilizando la función `generateRandomArray`. | ||
|
||
¡Pero no te preocupes! La propiedad `myStupidArray.length` devuelve la longitud de `myArray` (intenta hacer un `console.log` y verás la longitud que se muestra en la consola). | ||
|
||
```js | ||
var totalItems = myStupidArray.length; | ||
``` | ||
|
||
## 📝 Instrucciones: | ||
|
||
1. Crea una variable llamada `theLastOne` y asígnale el último elemento de `myStupidArray`. | ||
|
||
2. Luego, imprímelo en la consola. |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.