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
45 lines (33 loc) · 889 Bytes
/
02-datatypes.js
File metadata and controls
45 lines (33 loc) · 889 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
43
44
//Tipos de datos primitivos
// 1. cadenas de texto (string)
let name="Oli Rust"
let alias='olirus'
//2. Números (number)
let age=37 //entero
let height=1.77 //decimal
//3. booleanos (boolen)
let isTeacher = true
let isStudent = false
//4. Undefined
let undefinedValue
console.log(undefinedValue)
//5. Null
let nullValue=null
//6. Symbol
let mySymbol=Symbol("mysymbol")
//7. Bigint
let mybigint=BigInt(5646546578791165456456456)
let mybigint2= 5646546578791165456456456235n
//mostramos los tipos de datos
console.log(typeof name)
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 mybigint)
console.log(typeof mybigint2)