forked from mouredev/hello-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path02-datatypes.js
More file actions
42 lines (33 loc) · 961 Bytes
/
02-datatypes.js
File metadata and controls
42 lines (33 loc) · 961 Bytes
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
// 7 TIPOS DE DATOS PRIMITIVOS
// Cadena de texto (string)
let myName = "Isaac Garcia"
let alias = 'IsaacDev'
// Número (number)
let age = 37 // Entero
let height = 1.73 // Decimal
// Booleano (boolean)
let isMarried = true
let isWaitress = false
// Undefined
let undefinedValue
console.log(undefinedValue)
// Null
let nullValue = null
// Symbol valores unicos asociados
let mySimbol = Symbol('mySimbol')
// BigInt un numero infinitamente grande
let myBigInt = BigInt(2846059696512934596498569346868263589)
let myBigInt2 = 2846059696512934596498569346868263589n
// 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 isMarried)
console.log(typeof undefinedValue)
console.log(typeof nullValue)
console.log(typeof mySimbol)
console.log(typeof myBigInt)
console.log(typeof myBigInt2)