Tell us what’s happening:
Having problems with this one, think I must be missing something as I really cant understand what I meant to be comparing the year with
Your code so far
// User Editable Region
console.log(catalog.length);
console.log(Object.keys(byDecade).length);
let oldestYear = Infinity;
let newestYear = 0;
for (let i = 0; i < catalog.length; i++) {
if (catalog.year[i] !== "Unknown") {
if (catalog.year[i] < ) {
oldestYear = catalog.year[i];
}
if (catalog.year[i] > ) {
newestYear = catalog.year[i];
}
}
console.log(newestYear);
console.log(oldestYear);
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0
Challenge Information:
Build a Heritage Library Catalog - Step 30