Math Operators. Task 6/8 there is something wrong


#1


my problem is, anytime I type this code id doesn't work ,but if I tried to copy and paste it, it works I don't know what to do, I mean it's the same code what's wrong?
There are no error messages.
task 6/8.

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


#2

Could be because you're writing Math.random with a lowercase 'm' as it could be case sensitive. I tried it with lowercase and uppercase and it only works with an uppercase M in 'Math'.


#3

It's actually working, This was driving me crazy...:smiley:
Thank you very much.


#4

Just for note, Math is a special class of JavaScript, and like all JS classes, starts with a capital letter. In plain language, it is a built-in object.

JS built in objects (ECMA-262)

The Global Object
Object Objects
Function Objects
Array Objects
String Objects
Boolean Objects
Number Objects
The Math Object
Date Objects
RegExp Objects
Error Objects
The JSON Object

#5

Thank you I've tried it and it works.


#6

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