I have an array object now. The function should return an array of arrays of all object values. Where is the mistake?
const car = [
{
"name":"BMW",
"price":"55 000",
"country":"Germany",
"security":"Hight"
},
{
"name":"Mitsubishi",
"price":"93 000",
"constructor":"Bar John",
"door":"3",
"country":"Japan",
},
{
"name":"Mercedes-benz",
"price":"63 000",
"country":"Germany",
"security":"Hight"
}
];
function cars(car){
return car.map(function(key) {
return [[key]];
});
}
console.log(cars(car));