select all elements from an object js code example
Example 1: devolver nombre propiedades de objeto javascript
var coche =new Auto("Seat", "Ibiza", 90, 2010, 5000);
console.log(Object.keys(coche))
Example 2: listar objetos javascript
libros = ["Brideshead", "Faustus", "Musica"]
function libro(titulo, autor, ISBN) {
this.titulo = titulo;
this.autor = autor;
this.ISBN = ISBN;
}
var Brideshead = new libro("Retorno a Brideshead", "Evelyn Waugh", 8447308472);
var Faustus = new libro("Doctor Faustus", "Thomas Mann", 9788435018449);
var Musica = new libro("Una música constante", "Vikram Seth", 9780767904643)
console.log(Object.values(Brideshead))