Skip to content

Commit 19cb901

Browse files
authored
Merge pull request mouredev#6718 from markc1234/sintaxis-variables-tipos-datos-hola-mundo
#00 - typescript
2 parents 57d22f0 + 08e9331 commit 19cb901

File tree

1 file changed

+29
-0
lines changed
  • Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/typescript

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// EJERCICIO:
2+
// Crea un comentario en el código y coloca la URL del sitio web oficial del lenguaje de programación que has seleccionado.
3+
// https://www.typescriptlang.org
4+
5+
6+
// Representa las diferentes sintaxis que existen de crear comentarios en el lenguaje (en una línea, varias...).
7+
// Comentario de una linea
8+
/*
9+
Comentario de
10+
varias
11+
lineas
12+
*/
13+
14+
15+
(() => {
16+
// Crea una variable (y una constante si el lenguaje lo soporta).
17+
let cadena:string = "Cadena de texto"
18+
const numero = 10
19+
20+
// Crea variables representando todos los tipos de datos primitivos del lenguaje (cadenas de texto, enteros, booleanos...).
21+
const name = "Typescript"
22+
const age = 20
23+
const isStudent = true
24+
const nullVal = null
25+
const undefinedVal = undefined
26+
27+
// Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
28+
console.log(`¡Hola, ${name}`)
29+
})()

0 commit comments

Comments
 (0)