-
Notifications
You must be signed in to change notification settings - Fork 511
/
02-datatypes.js
55 lines (38 loc) · 1.02 KB
/
02-datatypes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Clase 17 - Tipos de datos
Vídeo: https://youtu.be/1glVfFxj8a4?t=3599
*/
// Tipos de datos primitivos
// Cadenas de texto (string)
let myName = "Brais Moure"
let alias = 'MoureDev'
let email = `braismoure@mouredev.com`
// Números (number)
let age = 37 // Entero
let height = 1.77 // Decimal
// Booleanos (boolean)
let isTeacher = true
let isStudent = false
// Undefined
let undefinedValue
console.log(undefinedValue)
// Null
let nullValue = null
// Symbol
let mySymbol = Symbol("mysymbol")
// BigInt
let myBigInt = BigInt(817239871289371986589716389471628379612983761289376129)
let myBigInt2 = 817239871289371986589716389471628379612983761289376129n
// Mostramos los tipos de datos
console.log(typeof myName)
console.log(typeof alias)
console.log(typeof email)
console.log(typeof age)
console.log(typeof height)
console.log(typeof isTeacher)
console.log(typeof isStudent)
console.log(typeof undefinedValue)
console.log(typeof nullValue)
console.log(typeof mySymbol)
console.log(typeof myBigInt)
console.log(typeof myBigInt2)