Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. //Area of a rectangle
  2. function computeArea(width, height) {
  3. return width * height;
  4. }
  5.  
  6. //Temperature conversion
  7. function celsToFahr(celsTemp) {
  8. return (celsTemp * 9 / 5) + 32;
  9. }
  10.  
  11. function fahrToCels(fahrTemp) {
  12. return (fahrTemp - 32) / 1.8;
  13. }
  14.  
  15. //Is Divisible (no remainder, use modulo)
  16. //return true if there is no remainder when divisse is divied by divisor
  17. function isDivisible(divisee, divisor) {
  18. return divisee % divisor === 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement