Numbers vs Math - Lesson 1


#1

How would I know when to use Math library vs using Numbers library?

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


#2

Math is an object, not a module. We do not need to import it. I’m not aware of any such similar object, Numbers. There is a built in function, Number().

Math

Study the list of constants and methods on the page above. if you have a need of any one of them, then that is when you would need to refer to the Math object.


#3

Thanks! But I don’t understand. I’ll get it sooner or later.
Cecilia D.


#4

In this course we don’t use the Math object for much more than Math.random() so don’t give it too much time, just now. Keep a bookmark to the page linked above so you can refer to the list when you get into more advanced topics and projects.


#5

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