Created
January 8, 2019 21:51
-
-
Save pmogollons/f2bd521b502f08e489fe099dd01caf6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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