Lesson

Learn Javascript, Random, codecademy, Javascript Tutorial

Lesson Summary

In this challenge we go over the introudction to javscript section in codecademy. Math.random() allows us to generate a random number between 0 and 1. If we wanted to get a number between 0 and 50 we could do ( Math.random() * 50 ). This would usually give a decimal though and if we wanted a whole number we would apply the Math.floor() function to our Math.random()

Share: