title: How can I add an event for a one time click to a function?
body: <p>I would like to add a click event listener to a function but would only like it to happen once. How could i do this?</p>
  <p>I would like to stay clear of JQuery as well if it is possible please.</p>
  <p>EDITED</p>
  <p>As the answers that I am getting for this are fully satisfying my need i thought i may make it a bit more clear with context.</p>
  <p>I am writing a function to draw a rectangle, first with one click on a button to initiate the rectangle function. Then there are two click event listeners in the drawRectangle function. These are the events i would like to happen only once in the function. Allowing the user to then create another rectangle if they click on the rectangle initiation button again.</p>