File tree 1 file changed +52
-0
lines changed
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/javascript
1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ /*
3
+ * - Crea un comentario en el código y coloca la URL del sitio web oficial del
4
+ * lenguaje de programación que has seleccionado
5
+ */
6
+ // Sitio web oficial de JavaScript -> https://developer.mozilla.org/es/docs/Web/JavaScript
7
+
8
+
9
+ /*
10
+ * - Representa las diferentes sintaxis que existen de crear comentarios
11
+ * en el lenguaje (en una línea, varias...).*/
12
+ /*
13
+ Esto es
14
+ un comentario
15
+ en varias
16
+ lineas
17
+ */
18
+
19
+
20
+ // * - Crea una variable (y una constante si el lenguaje lo soporta).
21
+ /*
22
+ Var -> Variable Global.
23
+ let -> Variable Local.
24
+ */
25
+
26
+ var variableGlobal = "Esto es una variable global."
27
+ let variableLocal = "Estos es una variable local."
28
+
29
+ // Const -> Constantes.
30
+ const constante = "Esto es una constante."
31
+
32
+
33
+ /*
34
+ * - Crea variables representando todos los tipos de datos primitivos
35
+ * del lenguaje (cadenas de texto, enteros, booleanos...).
36
+ */
37
+
38
+ // Datos Primitivos.
39
+ let entero = 1 // Number
40
+ let conDecimal = 3.12 // Decimal
41
+ let texto1 = "Hola Mundo" // String
42
+ let verdaddero = true // Boolean
43
+ let falso = false // Boolean
44
+ let noDefinido
45
+ let unDefined = undefined // Undefined
46
+ let conPrecision = 9862534839n //BigInt
47
+ let nulo = null // null
48
+
49
+
50
+ // * - Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
51
+
52
+ console . log ( "¡Hola, JavaScript!" )
You can’t perform that action at this time.
0 commit comments