Inches to Feet

Published by Mubashir Hassan in

Create a function that accepts a measurement value in inches and returns the equivalent of the measurement value in feet.

Examples

inchesToFeet(324) ➞ 27

inchesToFeet(12) ➞ 1

inchesToFeet(36) ➞ 3

Notes

  • If inches are under 12, return 0.
  • 12 inches = 1 foot.
Watch a quick demo on how Edabit works.