Skip to content

Instantly share code, notes, and snippets.

@OtacilioN
Last active January 25, 2021 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OtacilioN/006106c9c17013415be1f9f1ce553c46 to your computer and use it in GitHub Desktop.
Save OtacilioN/006106c9c17013415be1f9f1ce553c46 to your computer and use it in GitHub Desktop.
Sabia que você não precisa usar let em todos estes casos?
const pessoa = {};
const fila = [{nome: "Otacilio Maia", idade: "24"}];
pessoa.nome = "Antônio fakersom";
pessoa.idade = "42";
pessoa.frase = "JavaScript é super legal";
fila.push(pessoa);
fila[0].frase = "E tudo faz sentido";
console.log(fila, pessoa); // Qual é a saída?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment