Last active
September 22, 2017 16:48
-
-
Save DiegoPinho/0dc86f5f20aea44ca6ea4d2805001a79 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 autor = 'J. K. Rowling'; | |
const titulo = 'Harry Potter'; | |
const paginas = 'Paginas'; | |
const livro = { | |
autor, titulo, | |
mostra() { | |
console.log(`${this.titulo} escrito por ${this.autor}`) | |
}, | |
["numero" + paginas]: 572 | |
} | |
livro.mostra(); // Harry Potter escrito por J. K. Rowling | |
console.log(livro.numeroPaginas); // 572 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment