Skip to content

Commit 39c76bf

Browse files
committed
Clase 7 FINAL | 21/08/2024
Console y módulos
1 parent af1c97b commit 39c76bf

34 files changed

+304
-36
lines changed

Basic/00-helloworld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 1 en vídeo | 10/07/2024
33
Introducción, instalación, hola mundo y variables
4-
https://www.twitch.tv/videos/2194200202?t=00h14m43s
4+
https://www.youtube.com/live/hoULS5isDck?si=qtcStT34Ef8ETBmB&t=915
55
*/
66

77
// Esto es un comentario simple

Basic/01-variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 1 en vídeo | 10/07/2024
33
Introducción, instalación, hola mundo y variables
4-
https://www.twitch.tv/videos/2194200202?t=00h14m43s
4+
https://www.youtube.com/live/hoULS5isDck?si=qtcStT34Ef8ETBmB&t=915
55
*/
66

77
// var

Basic/02-datatypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// Tipos de datos primitivos

Basic/03-beginner-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// 1. Escribe un comentario en una línea

Basic/04-operators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// Operadores Aritméticos

Basic/05-operators-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// 1. Crea una variable para cada operación aritmética

Basic/06-strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// Strings (cadenas de texto)

Basic/07-strings-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 2 en vídeo | 17/07/2024
33
Tipos de datos, operadores y strings
4-
https://www.twitch.tv/videos/2200149072?t=00h08m02s
4+
https://www.youtube.com/live/euVbF1eatEY?si=nHS3QznAlA_C39NK&t=808
55
*/
66

77
// 1. Concatena dos cadenas de texto

Basic/08-conditionals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 3 en vídeo | 24/07/2024
33
Condicionales, arrays y sets
4-
https://www.twitch.tv/videos/2206228701?t=00h16m02s
4+
https://www.youtube.com/live/XCNjoIoO3Ws?si=3XCjdZ9r41JID-by&t=978
55
*/
66

77
// if, else if, else

Basic/09-conditionals-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 3 en vídeo | 24/07/2024
33
Condicionales, arrays y sets
4-
https://www.twitch.tv/videos/2206228701?t=00h16m02s
4+
https://www.youtube.com/live/XCNjoIoO3Ws?si=3XCjdZ9r41JID-by&t=978
55
*/
66

77
// if/else/else if/ternaria

Basic/10-array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 3 en vídeo | 24/07/2024
33
Condicionales, arrays y sets
4-
https://www.twitch.tv/videos/2206228701?t=00h16m02s
4+
https://www.youtube.com/live/XCNjoIoO3Ws?si=3XCjdZ9r41JID-by&t=978
55
*/
66

77
// Array

Basic/11-set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 3 en vídeo | 24/07/2024
33
Condicionales, arrays y sets
4-
https://www.twitch.tv/videos/2206228701?t=00h16m02s
4+
https://www.youtube.com/live/XCNjoIoO3Ws?si=3XCjdZ9r41JID-by&t=978
55
*/
66

77
// Set

Basic/12-map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// Map

Basic/13-structures-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// 1. Crea un array que almacene cinco animales

Basic/14-loops.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// Loops o bucles

Basic/15-loops-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// NOTA: Explora diferentes sintaxis de bucles para resolver los ejercicios

Basic/16-functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// Funciones

Basic/17-functions-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 4 en vídeo | 31/07/2024
33
Mapas, bucles y funciones
4-
https://www.twitch.tv/videos/2212289583?t=00h17m45s
4+
https://www.youtube.com/live/xg1GeHKiNzU?si=oiWHK8bDTZ1c98hF&t=885
55
*/
66

77
// NOTA: Explora diferentes sintaxis de funciones para resolver los ejercicios

Basic/18-objects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 5 en vídeo | 07/08/2024
33
Objetos, desestructuración, propagación y clases
4-
https://www.twitch.tv/videos/2218300512?t=00h17m10s
4+
https://www.youtube.com/live/SBXEpAx_y_Q?si=Sbqqa2-_eGwsUkH-&t=958
55
*/
66

77
// Objetos

Basic/19-objects-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 5 en vídeo | 07/08/2024
33
Objetos, desestructuración, propagación y clases
4-
https://www.twitch.tv/videos/2218300512?t=00h17m10s
4+
https://www.youtube.com/live/SBXEpAx_y_Q?si=Sbqqa2-_eGwsUkH-&t=958
55
*/
66

77
// 1. Crea un objeto con 3 propiedades

Basic/20-destructuring-spreading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 5 en vídeo | 07/08/2024
33
Objetos, desestructuración, propagación y clases
4-
https://www.twitch.tv/videos/2218300512?t=00h17m10s
4+
https://www.youtube.com/live/SBXEpAx_y_Q?si=Sbqqa2-_eGwsUkH-&t=958
55
*/
66

77
let myArray = [1, 2, 3, 4]

Basic/21-destructuring-spreading-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 5 en vídeo | 07/08/2024
33
Objetos, desestructuración, propagación y clases
4-
https://www.twitch.tv/videos/2218300512?t=00h17m10s
4+
https://www.youtube.com/live/SBXEpAx_y_Q?si=Sbqqa2-_eGwsUkH-&t=958
55
*/
66

77
// 1. Usa desestructuración para extraer los dos primeros elementos de un array

Basic/22-classes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 5 en vídeo | 07/08/2024
33
Objetos, desestructuración, propagación y clases
4-
https://www.twitch.tv/videos/2218300512?t=00h17m10s
4+
https://www.youtube.com/live/SBXEpAx_y_Q?si=Sbqqa2-_eGwsUkH-&t=958
55
*/
66

77
// Clases

Basic/23-classes-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 6 en vídeo | 15/08/2024
33
Clases (continuación) y manejo de errores
4-
https://www.twitch.tv/videos/2225058195?t=00h16m42s
4+
https://www.youtube.com/live/8p6SLAIgwZI?si=MS9o7qIhezx9NTQX&t=902
55
*/
66

77
// 1. Crea una clase que reciba dos propiedades

Basic/24-error-handling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 6 en vídeo | 15/08/2024
33
Clases (continuación) y manejo de errores
4-
https://www.twitch.tv/videos/2225058195?t=00h16m42s
4+
https://www.youtube.com/live/8p6SLAIgwZI?si=MS9o7qIhezx9NTQX&t=902
55
*/
66

77
// Excepción

Basic/25-error-handling-exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Clase 6 en vídeo | 15/08/2024
33
Clases (continuación) y manejo de errores
4-
https://www.twitch.tv/videos/2225058195?t=00h16m42s
4+
https://www.youtube.com/live/8p6SLAIgwZI?si=MS9o7qIhezx9NTQX&t=902
55
*/
66

77
// 1. Captura una excepción utilizando try-catch

Basic/26-console-methods.js

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
Clase 7 en vídeo | 21/08/2024
3+
Console y módulos
4+
https://www.youtube.com/live/PAnxhBE5kIE?si=V0F_NsKO9lmhhatu&t=555
5+
*/
6+
7+
// Console
8+
9+
// log
10+
11+
console.log("¡Hola, JavaScript!")
12+
13+
// error
14+
15+
console.error("Este es un mensaje de error.")
16+
console.error("Error al conectarse a la base de datos: ", new Error("Conexión fallida."))
17+
18+
// warn
19+
20+
console.warn("Este es un mensaje de advertencia.")
21+
22+
// info
23+
24+
console.info("Este es un mensaje de información adicional.")
25+
26+
// table
27+
28+
let data = [
29+
["Brais", 37],
30+
["Sara", 21]
31+
]
32+
33+
console.table(data)
34+
35+
data = [
36+
{ name: "Brais", age: 37 },
37+
{ name: "Sara", age: 21 }
38+
]
39+
40+
console.table(data)
41+
42+
// group
43+
44+
console.group("Usuario:")
45+
console.log("Nombre: Brais")
46+
console.log("Edad: 37")
47+
console.groupEnd()
48+
49+
// time
50+
51+
console.time("Tiempo de ejecución 2")
52+
53+
for (let i = 0; i < 10000; i++) {
54+
55+
}
56+
57+
console.time("Tiempo de ejecución 1")
58+
59+
for (let i = 0; i < 10000; i++) {
60+
61+
}
62+
63+
console.timeEnd("Tiempo de ejecución 2")
64+
65+
for (let i = 0; i < 10000; i++) {
66+
67+
}
68+
69+
console.timeEnd("Tiempo de ejecución 1")
70+
71+
// assert
72+
73+
let age = 17
74+
console.assert(age >= 18, "El usuario debe ser mayor de edad.")
75+
76+
// count
77+
78+
console.count("Click")
79+
console.count("Click")
80+
console.count("Click")
81+
console.countReset("Click")
82+
console.count("Click")
83+
84+
// trace
85+
86+
function funcA() {
87+
funcB()
88+
}
89+
90+
function funcB() {
91+
console.trace("Seguimiento de la ejecución.")
92+
}
93+
94+
funcA()
95+
96+
// clear
97+
98+
// console.clear()

Basic/27-console-methods-exercises.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Clase 7 en vídeo | 21/08/2024
3+
Console y módulos
4+
https://www.youtube.com/live/PAnxhBE5kIE?si=V0F_NsKO9lmhhatu&t=555
5+
*/
6+
7+
// 1. Crea un función que utilice error correctamente
8+
9+
// 2. Crea una función que utilice warn correctamente
10+
11+
// 3. Crea una función que utilice info correctamente
12+
13+
// 4. Utiliza table
14+
15+
// 5. Utiliza group
16+
17+
// 6. Utiliza time
18+
19+
// 7. Valida con assert si un número es positivo
20+
21+
// 8. Utiliza count
22+
23+
// 9. Utiliza trace
24+
25+
// 10. Utiliza clear

0 commit comments

Comments
 (0)