here is the code for the first out of 4 tasks . didn't take me to long but i used quite a bit of if statements.
var temp = prompt("hey there, whats the temperature?");
console.log(temp);
if( temp < 0)
{
alert("It’s freezing out there!")
}
else
{
if( 25 > temp > 0)
{
alert("You don’t need skis or board shorts!")
}
else
{
if(temp > 25)
{
alert("It’s hot out there!")
}
else
{
}
}
}
No comments:
Post a Comment