← Back to challenges

Inches to Feet

JavaScriptMediummathlanguage_fundamentals

Instructions

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.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Leap Year Function ⌚