Why does JavaScript have the Math object? : <p>In many languages, to find cosine, you use <code>cos(x)</code>. But in JavaScript, you must use <code>Math.cos(x)</code>. Why doesn't JavaScript spare us the 5 characters in <code>Math.</code>, both making it easier to type and easier to read?</p>

<p>I have tried to Google this multiple times, and found no answers. Is there any practical reason for this that I have not yet found?</p>

<p>So far, there are three reasons I can think of:</p>

<ol>
<li><p>The creators of JavaScript want to ensure that the math functions do not coincide with other functions users create (Like a function called 'cos()` that calculates, say, cosecant)</p></li>
<li><p>The creators of JavaScript thought that <code>Math</code> would make the code more readable</p></li>
<li><p>The creators of JavaScript perhaps didn't want any functions that have <code>window</code> as a parent (Though <code>alert</code> and <code>prompt</code> make this unlikely)</p></li>
</ol>
