About semantics : Math, library or object?


#1

Just a little question about semantics.

In the Codecademy’s aptly named Libraries chapter, it says Math is a library.
But in the javascript reference linked (mdn), it says Math is an object.

So, which one is it?


#2

Both. It is both an object and a library. An object since it follows the prototypal schema of JS, and a library since it consists of disjointed methods that all serve the same end, a repository of Math functions and constants.


#3

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