title: My job quote calculator is returning "X is not a function"
body: <p>This is a corporate massage job quote calculator.</p>
  
  <p>From the user, we collect:</p>
  
  <ul>
  <li>Start time</li>
  <li>End time</li>
  <li>Number of clients needing a massage</li>
  </ul>
  
  <p>We then use those variables in conjunction with our business rules of time needed per person and hourly rate for a therapist to determine how many therapists are needed and how much it will cost the client to staff those therapists. </p>
  
  <p>When ran, my console displays an error message "timeStr.split is not a function". I thought there was an issue with the .map() method but I've tried resolving to no avail. I am new to JS and could really use some help, please. Here is the code</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;body&gt;
      &lt;label for="starttime"&gt;Start Time&lt;/label&gt;&lt;br&gt;
      &lt;input id="starttime" type="time" name="starttime" placeholder="Start time"&gt;&lt;br&gt;
      &lt;label for="endtime"&gt;End Time&lt;/label&gt;&lt;br&gt;
      &lt;input id="endtime" type="time" name="endtime" placeholder="End time"&gt;&lt;br&gt;
      &lt;label for="clients"&gt;# of people needing massage&lt;/label&gt;&lt;br&gt;
      &lt;input id="clients" type="number" name="clients" id=""&gt;&lt;br&gt;
      &lt;input  type="button" value="Submit" id="inputbtn" onclick="calc()"&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>/*User Inputs*/
          const start = document.getElementById("starttime").value;
          const end = document.getElementById("endtime").value;
          const people = document.getElementById("clients").value;
          let timeStart = new Date("01/02/2020" + start);
          let timeEnd = new Date("01/02/2020"+end);
  
          /*constants*/
          const rate = 80;
          const allot = "00:20:00";
  
  
          /*Time converter*/
  
          function convTime(timeStr){
              arr = timeStr.split(":");
              arr = arr.map(Number=&gt; Number);
  
              let theHours = arr[0];
              let theMinutes = arr[1]/60;
              let timeDec = theHours+theMinutes;
  
              return timeDec;
  
          }
  
  
          /*formulas*/
          const ogTime = timeEnd - timeStart;
          const givenTime = convTime(ogTime);
          const convAllot = convTime(allot)
          const realTime = people*convAllot;
          const therapists = realTime/givenTime;
          const price = therapists*rate*givenTime;
  
  
          console.log(price);
  </code></pre>