Skip to content

Instantly share code, notes, and snippets.

@gusmcnair
Created October 1, 2019 18:32
Show Gist options
  • Save gusmcnair/1d8e7bd6fb328d24cd49b40fb04b7264 to your computer and use it in GitHub Desktop.
Save gusmcnair/1d8e7bd6fb328d24cd49b40fb04b7264 to your computer and use it in GitHub Desktop.
Thinkful numbers assignment
Compute Area
function computeArea(width, height) {
const area = width * height;
return area;
}
Fahrenheit to Celsius and Celsius to Fahrenheit
function celsToFahr(celsTemp) {
const fahrenheit = (celsTemp * 1.8 + 32);
return fahrenheit;
}
function fahrToCels(fahrTemp) {
const celsius = ((fahrTemp - 32) / 1.8)
return celsius;
}
isDivisible
function isDivisible(divisee, divisor) {
if (divisee % divisor === 0){
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment