Skip to content

Commit

Permalink
✨ Add typescript solution challenge-00
Browse files Browse the repository at this point in the history
  • Loading branch information
marcode24 committed Jan 16, 2024
1 parent 7596f0b commit 6174bf4
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions 2024/00-sintaxis-variables-tipos-de-datos-y-hola-mundo/solution.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// ¡Preparad@ para aprender o repasar el lenguaje de programación que tú quieras?
// - Recuerda que todas las instrucciones de participación están en el
// repositorio de GitHub.
//
// Lo primero... ¿Ya has elegido un lenguaje?
// - No todos son iguales, pero sus fundamentos suelen ser comunes.
// - Este primer reto te servirá para familiarizarte con la forma de participar
// enviando tus propias soluciones.
//
// EJERCICIO:
// - Sitio web oficial de JavaScript: https://developer.mozilla.org/es/docs/Web/JavaScript

// - Representa las diferentes sintaxis que existen de crear comentarios
// en el lenguaje (en una línea, varias...).

/*
Comentario de múltiples líneas
*/

// - Crea una variable (y una constante si el lenguaje lo soporta).
let miVariable2: string = 'Hola, mundo';
// eslint-disable-next-line no-unused-vars
const miConstante2: number = 42;

// - Crea variables representando todos los tipos de datos primitivos
// del lenguaje (cadenas de texto, enteros, booleanos...).
let cadenaTexto2: string = 'Hola';
let numeroEntero2: number = 42;
let numeroDecimal2: number = 3.14;
let booleano2: boolean = true;
let bigInt2: bigint = 9007199254740991n;
let nulo2: null = null;
let indefinido2: undefined = undefined;
let simbolo2: symbol = Symbol('Hola');
let objeto2: { nombre: string; edad: number } = {
nombre: 'Pepe',
edad: 42,
};
let array2: number[] = [1, 2, 3];

// - Imprime por terminal el texto: "¡Hola, JavaScript!"
console.log('¡Hola, JavaScript!');

0 comments on commit 6174bf4

Please sign in to comment.