You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Alan is known for referring to the temperature of the apple turnover as Hotter than the sun!. According to space.com the temperature of the sun's corona is 2,000,000 degrees Celsius, but we will ignore the science for now.
// Task
// Your job is simple, if x squared is more than 1000, return It's hotter than the sun!!, else, return Help yourself to a honeycomb Yorkie for the glovebox.
// Note: Input will either be a positive integer (or a string for untyped languages).
//**2 Method
function apple(x){
if (x**2 > 1000){
return 'It\'s hotter than the sun!!'
}else{
return 'Help yourself to a honeycomb Yorkie for the glovebox.'
}
}
//Math.Pow method
function apple(x){
return Math.pow(x, 2) > 1000 ? 'It\'s hotter than the sun!!' : 'Help yourself to a honeycomb Yorkie for the glovebox.' ;