Skip to content

Instantly share code, notes, and snippets.

@pmogollons
Created January 8, 2019 21:51
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 pmogollons/f2bd521b502f08e489fe099dd01caf6d to your computer and use it in GitHub Desktop.
Save pmogollons/f2bd521b502f08e489fe099dd01caf6d to your computer and use it in GitHub Desktop.
const mascota = {
nombre: 'Tommy',
tipo: 'Perro'
};
const mascotas = [mascota];
mascota.nombre = 'Tomas';
mascotas[0] = 'Moficado';
// El contenido de estas objetos y arrays puede ser modificado
console.log(mascota);
console.log(mascotas);
// Las variables como tal no se pueden reasignar
mascota = {
nombre: 'Tomas',
tipo: 'Perror'
};
mascotas = [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment