Variable Jump Height

I have been working on my latest game, and I ran into an issue with jumping. The issue is that when the player presses the jump button, in my case the A button on the controller, I wanted the character to jump. By releasing the jump button instead of holding it down I wanted the character to jump short of the max height that they could reach.

Well, I found a solution that I was able to incorporate into my project and I wanted to share the solution with you in case you were also running into this issue.

Below is a post I found on the unity3D subreddit from the user dookie-boy where he talks about how he accomplished this feat.