JavaScript Kernel Post
Using Jupyter JavaScript kernel
function myFunction(a, b) {
return a * b;
}
myFunction(125,5)
function toCelsius(fahrenheit) {
return (5/9) * (fahrenheit-32);
}
toCelsius(0)
function IsOdd(x){
if (x % 2 == 0) {
console.log(x + " is an even number");
} else {
console.log(x + " is an odd number");
}
}
IsOdd(24)
function DaysHoursMinutesSeconds(x){
console.log(x + " hour(s) is equivalent to " + x/24 + " days, " + x*60 + " minutes, and " + x*3600 + " seconds.")
}
DaysHoursMinutesSeconds(48)