Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VARIAVEIS
- const nome = 'Marcelo
- let idade = 18
- const verificar = true
- let sobrenome = undefined
- const corSelecionado = null
- typeof(sobrenome)
- NUMEROS
- Number('2.0')
- Number.isInteger(numero)
- numero.toFixed(2)
- numero.toString()
- STRINGS
- texto.charAt(3)
- texto.charCodeAt(3)
- texto.indexOf('a')
- texto.substring(1)
- texto.concat(texto2)
- texto.replace('e', '3')
- string.split(',')
- ARRAYS
- valores.length
- valores.push(novoValor)
- valores.pop()
- delete valores[0]
- ESCOPO
- var: tem escopo global e escopo de função
- let: tem escopo global, escopo de função e escopo de bloco
- DATAS
- data = new Date(0)
- data.getTime()
- OBJETOS
- Object.assign
- Object.freeze()
- Object.keys()
- Object.values()
- Object.defineProperty
- Object.entries
- objeto.__proto__
- Object.setPrototypeOf()
- Object.preventExtension()
- Object.isExtensible()
- Object.seal()
- Object.isSealed()
- JSON.stringify()
- super
- ARRAY
- aprovados = new Array(1, 2, 3)
- aprovados.push('4')
- aprovados.sort()
- delete aprovados[1]
- aprovados.splice(1, 2, 'elemento1', 'elemento2')
- aprovados.length
- aprovados.pop()
- aprovados.shitft()
- aprovados.unshift(5)
- novoArray = aprovados.slice(2, 4)
- /*
- function pessoa() {
- this.idade = 0
- setInterval(function () {
- this.idade++
- console.log(this.idade)
- }.bind(this), 1000)
- }
- new pessoa
- */
- ARROW FUNCTION
- dobro = a => 2 * a
Add Comment
Please, Sign In to add comment