Solve programming problems in Javascript or TypeScript!
previous ~ next ~ JS Syntax HelpText Tuesday
--goingSwimming
Take in a temperature (number) and if it is sunny (true/false) and determine if they should go swimming (true/false). If it is really hot (over 90), they should always go swimming. If it is over 70 and sunny, they should go swimming. Otherwise, no swimming.
Examples
- goingSwimming(45, true) → false
- goingSwimming(85, false) → false
- goingSwimming(82, true) → true
(ctrl-enter)
xxxxxxxxxx
1
function goingSwimming(temperature, sun){
2
3
}