Math.random lesson?


#1

https://www.codecademy.com/courses/learn-javascript/lessons/introduction-to-javascript/exercises/random

It’s outputting a random number but it’s not moving forward with the lesson. I’m just on the first step.



console.log (Math.random() * 100);



#2

its really uncommon to have a space between console.log and (, see what happens when you remove the space. Given console.log() is a function call, a space before the opening parenthesis is really uncommon


#3

It still doesn’t let me move forward even if I remove the space.


#4

can you upload a screenshot?


#5

It’s outputting what it needs to I’m pretty sure, at least, it’s random numbers, so.


#6

and nothing works? refreshing page, different browser? I don’t see a problem with your code


#7

@betawhiz21505 are you currently on task 1 of the lesson random?

I just completed the lesson and I am not getting any error messages myself


#8

Hi @betawhiz21505,

White space really messed some of the exercises’ SCT (submission test), apart from what @stetim94 mentioned, it shouldn’t matter in other part of real code.

Try:

console.log(Math.random()*100);

without any white space, see if it works. (Just my guess)

Cheers :slight_smile:


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.