Generate Random Fractions with Javascript, freeCodeCamp Basic Javascript

Lesson Summary

In this challenge we learn how to generate random fractions with javascript. In javascript, generating random numbers and/or fractions is possible through the Math.random() function. This function gives us a number between 0 (inclusive) and 1 (exclusive). Math.random() will never return quite a 1 but in next lesson we learn how to generate whole numbers so stick around.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required