I am trying to create a sort of a timetable that also tells me which day someone has a bigger number. The table is working fine, but I cannot figure out how to compare each day without doing a lot of if's.
This is my code below (the table and the object)
let Time = {
Person1: {
Monday: 9,
Tuesday: 7,
Wednesday: 8,
Thursday: 7,
Friday: 7,
},
Person2: {
Monday: 8,
Tuesday: 8,
Wednesday: 7,
Thursday: 7,
Friday: 9,
},
};
console.table(Time);
I want it to display 'Person 2' if Monday from person 1 is smaller than Monday from person 2 (for each day). Can I do that?