Skip to content

Commit 7593b2b

Browse files
committed
Día 6: JavaScript
1 parent 8b6a54e commit 7593b2b

File tree

6 files changed

+153
-11
lines changed

6 files changed

+153
-11
lines changed

06 - JavaScript/hello_world.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Día 6: JavaScript
2-
// Clase en vídeo: https://www.twitch.tv/videos/1835012829?t=00h18m21s
2+
// Clase en vídeo: https://youtu.be/6cnFl9aHD5Y
33

44
/*
55
Esto es un comentario

08 - Go/go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module main
2+
3+
go 1.20

08 - Go/hello_world.go

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
// Día 8: Go
2+
// Clase en vídeo: https://www.twitch.tv/videos/1852979951?t=00h22m39s
3+
4+
// Creación de módulo: go mod init main
5+
package main
6+
7+
import (
8+
"container/list"
9+
"fmt"
10+
"reflect"
11+
)
12+
13+
func main() {
14+
15+
// Hola mundo
16+
17+
fmt.Println("Hola, Go!")
18+
19+
/*
20+
Esto es un comentario
21+
*/
22+
23+
// Variables
24+
25+
var myString string = "Esto es una cadena de texto"
26+
fmt.Println(myString)
27+
28+
myString = "Aquí cambio el valor de la cadena de texto"
29+
fmt.Println(myString)
30+
31+
// myString = 6 Error
32+
33+
var myString2 = "Esto es una cadena de texto"
34+
fmt.Println(myString2)
35+
36+
var myInt int = 7
37+
myInt = myInt + 4
38+
fmt.Println(myInt)
39+
fmt.Println(myInt - 1)
40+
fmt.Println(myInt)
41+
42+
fmt.Println(myString, myInt)
43+
44+
fmt.Println(reflect.TypeOf(myInt))
45+
46+
var myFloat float64 = 6.5
47+
fmt.Println(myFloat)
48+
fmt.Println(reflect.TypeOf(myFloat))
49+
50+
fmt.Println(float64(myInt) + myFloat)
51+
52+
var myBool bool = false
53+
myBool = true
54+
fmt.Println(myBool)
55+
56+
// Variable declarada e inicializada de manera abreviada
57+
58+
myString3 := "Esto es una cadena de texto"
59+
fmt.Println(myString3)
60+
61+
// Constantes
62+
63+
const myConst = "Esto es una constante"
64+
fmt.Println(myConst)
65+
66+
// Control de flujo
67+
68+
if myInt == 10 && myString == "Hola" {
69+
fmt.Println("El valor es 10")
70+
} else if myInt == 11 || myString == "Hola" {
71+
fmt.Println("El valor es 11")
72+
} else {
73+
fmt.Println("El valor no es 10")
74+
}
75+
76+
// Array
77+
78+
var myArray [3]int
79+
myArray[0] = 1
80+
myArray[1] = 2
81+
myArray[2] = 3
82+
// myArray[3] = 3 Error
83+
fmt.Println(myArray[2])
84+
// fmt.Println(myArray[3]) Error
85+
86+
// Map
87+
88+
myMap := make(map[string]int)
89+
myMap["Brais"] = 36
90+
myMap["crais01"] = 35
91+
myMap["hoz98"] = 24
92+
fmt.Println(myMap)
93+
fmt.Println(myMap["Brais"])
94+
95+
myMap2 := map[string]int{"Brais": 36, "crais01": 35, "hoz98": 24}
96+
fmt.Println(myMap2)
97+
98+
// List
99+
100+
myList := list.New()
101+
myList.PushBack(1)
102+
myList.PushBack(2)
103+
myList.PushBack(3)
104+
fmt.Println(myList.Back().Value)
105+
106+
// Bucles
107+
108+
for index := 0; index < len(myArray); index++ {
109+
fmt.Println(myArray[index])
110+
}
111+
112+
for key, value := range myMap {
113+
fmt.Println(key, value)
114+
}
115+
116+
for index, value := range myArray {
117+
fmt.Println(index, value)
118+
}
119+
120+
// Función
121+
122+
fmt.Println(myFunction())
123+
124+
// Estructura
125+
126+
type MyStruct struct {
127+
name string
128+
age int
129+
}
130+
131+
myStruct := MyStruct{"Brais", 36}
132+
fmt.Println(myStruct)
133+
}
134+
135+
func myFunction() string {
136+
return "Mi función"
137+
}

Media/go.jpg

242 KB
Loading

Media/next.jpg

-64.3 KB
Loading

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ Así con cada uno de los lenguajes.
7979

8080
### <a href=""><img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/javascript/javascript-original.svg" style="height: 3%; width:3%;"/></a> Día 6: JavaScript
8181

82-
<a href="https://www.twitch.tv/videos/1829088315?t=00h17m36s"><img src="./Media/javascript.jpg" style="height: 50%; width:50%;"/></a>
82+
<a href="https://youtu.be/6cnFl9aHD5Y"><img src="./Media/javascript.jpg" style="height: 50%; width:50%;"/></a>
8383

84-
#### [Clase en vídeo](https://www.twitch.tv/videos/1835012829?t=00h18m21s) y [Código](./06%20-%20JavaScript)
84+
#### [Clase en vídeo](https://youtu.be/6cnFl9aHD5Y) y [Código](./06%20-%20JavaScript)
8585

8686
**Recursos:** [Web oficial](https://developer.mozilla.org/es/docs/Web/JavaScript) | [Editor en línea](https://playcode.io/javascript-compiler) | [Tutorial Mozilla](https://developer.mozilla.org/es/docs/Web/JavaScript) | [Documentación](https://developer.mozilla.org/es/docs/Learn/JavaScript/First_steps) | [Tutorial W3Schools](https://www.w3schools.com/js/) | [Libro Aprendiendo JavaScript](https://mouredev.com/aprendiendojs)
8787

@@ -91,20 +91,22 @@ Así con cada uno de los lenguajes.
9191

9292
#### [Clase en vídeo](https://www.twitch.tv/videos/1841100654?t=00h17m59s) y [Código](./07%20-%20TypeScript)
9393

94-
**Recursos:** [Web oficial](https://www.typescriptlang.org/es/)| [Editor en línea](https://www.typescriptlang.org/es/play) | [Configuración](https://www.typescriptlang.org/download) | [Documentación](https://www.typescriptlang.org/es/docs/) | [Tutorial W3Schools](https://www.w3schools.com/typescript/index.php) | [Tutorial Microsoft](https://learn.microsoft.com/es-es/training/browse/?terms=typescript)
94+
**Recursos:** [Web oficial](https://www.typescriptlang.org/es/) | [Editor en línea](https://www.typescriptlang.org/es/play) | [Configuración](https://www.typescriptlang.org/download) | [Documentación](https://www.typescriptlang.org/es/docs/) | [Tutorial W3Schools](https://www.w3schools.com/typescript/index.php) | [Tutorial Microsoft](https://learn.microsoft.com/es-es/training/browse/?terms=typescript)
9595

96-
### <a href=""><img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/go/go-original-wordmark.svg" style="height: 3%; width:3%;"/></a> Día 8: Go `PRÓXIMA CLASE`
96+
### <a href=""><img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/go/go-original-wordmark.svg" style="height: 3%; width:3%;"/></a> Día 8: Go
9797

98-
<a href="https://www.twitch.tv/mouredev"><img src="./Media/next.jpg" style="height: 50%; width:50%;"/></a>
98+
<a href="https://www.twitch.tv/videos/1852979951?t=00h22m39s"><img src="./Media/go.jpg" style="height: 50%; width:50%;"/></a>
9999

100-
#### Clase en directo: Jueves 22 de Junio en [Twitch](https://twitch.tv/mouredev) a las 20:00 CEST
101-
> ##### Consulta el horario por país y añade un recordatorio desde [Discord](https://discord.gg/mouredev?event=1116689603332681730)
100+
#### [Clase en vídeo](https://www.twitch.tv/videos/1852979951?t=00h22m39s) y [Código](./08%20-%20Go)
102101

103-
### Día 9: Rust
102+
**Recursos:** [Web oficial](https://go.dev) | [Editor en línea](https://go.dev/play/) | [Configuración](https://go.dev/doc/install) | [Documentación](https://go.dev/doc) | [Tutorial](https://go.dev/learn) | [Tutorial Microsoft](https://learn.microsoft.com/es-es/training/paths/go-first-steps/)
104103

105-
<a href=""><img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/rust/rust-plain.svg" style="height: 10%; width:10%;"/></a>
104+
### <a href=""><img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/rust/rust-plain.svg" style="height: 3%; width:3%;"/></a> Día 9: Rust `PRÓXIMA CLASE`
106105

107-
> ##### Clase en directo: Próximamente...
106+
<a href="https://www.twitch.tv/mouredev"><img src="./Media/next.jpg" style="height: 50%; width:50%;"/></a>
107+
108+
#### Clase en directo: Jueves 6 de Julio en [Twitch](https://twitch.tv/mouredev) a las 20:00 CEST
109+
> ##### Consulta el horario por país y añade un recordatorio desde [Discord](https://discord.gg/mouredev?event=1121720570489339915)
108110
109111
### Día 10: PHP
110112

0 commit comments

Comments
 (0)