forked from EBAC-QE/aula-java-scrip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtipos.js
More file actions
24 lines (22 loc) · 633 Bytes
/
Copy pathtipos.js
File metadata and controls
24 lines (22 loc) · 633 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
const texto = "Olá"
const numero = 12
const booleano = true// false - 0 ou 1
const array = ["azul", "amarelo", "branco"]
const objeto = { nome: 'Fábio', cidade: 'São Paulo'}
let valorIndefinido
let valorNulo = null
document.getElementById('tipos').innerHTML = `
Texto: ${texto} <br>
Número: ${numero} <br>
Booleano: ${booleano} <br>
Array: ${array} <br>
Objeto nome: ${objeto.nome} <br>
Objeto cidade: ${objeto.cidade} <br>
`
console.log(typeof texto)
console.log(typeof numero)
console.log(typeof booleano)
console.log(typeof array)
console.log(typeof objeto)
console.log(typeof valorIndefinido)
console.log(typeof valorNulo)