Cod: Selectaţi tot
const yo = {
one: {
value: 0,
mission: 17},
two: {
value: 18,
mission: 3},
three: {
value: -2,
mission: 4},
}
Cum pot face asta într-un mod simplu?
Cod: Selectaţi tot
const yo = {
one: {
value: 0,
mission: 17},
two: {
value: 18,
mission: 3},
three: {
value: -2,
mission: 4},
}
Cod: Selectaţi tot
const yo = {
one: {
value: 9,
mission: 17
},
two: {
value: 18,
mission: 6
},
three: {
value: 3,
mission: 4
},
}
const val_mission = Object.values(yo).map(({ mission }) => mission);
let min_mission = Math.min(...val_mission);
console.log(min_mission); // 4