JSFiddle - React, Tailwind, and code Playground

by js_test

JavaScript

export const HEIGHT_TYPES = createConstant(
  Array(48).reduce(
    (types, inches, i) => {
      const base = 12;
      const feet = Math.floor(inches / base);
      const remaining = (inches % base);
      
      return ({
        ...types,
        [`${feet}' ${remaining}"`]: inches + 1
      })
    }, {}
  )
);