Not sure if my code is working, but the error I'm seeing is "'result' is declared but its value is never read.ts(6133)"
This is just an introductory exercise, so I'm open to suggestions/guidance on how the same thing can be accomplished. The way I've done it is three IF statements for the event type with nested IF statements for each temperature range.
let eventType = window.prompt("What type of event are you going to?");
let tempFahr = window.prompt("What is will the temperature be?");
if (eventType=='casual') { // casual event
if (tempFahr < 54) { // temp less than 54
let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and a coat';
} else if (54 < tempFahr < 70) { // temp between 54 and 70
let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and a jacket';
} else { // temp more than 70
let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and no jacket';
}
} else if (eventType=='semi-formal') { // semi-formal event
if (tempFahr .. (Etc.)...
``````````````
{
let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear a suit and no jacket';
}
}
console.log(result);