What's the difference between str.fun() / str.fun / fun(str) in JavaScript?
<p>I tried googling but couldn't find a precise answer, so allow me to try and ask here. If the question does not seem proper, please let me know and I'll delete it.</p>

<p>In JS you've got three different way of writing certain build in functionalities:</p>

<ul>
<li>str.length</li>
<li>str.toString()</li>
<li>parseInt(str)</li>
</ul>

<p>I wonder if there is a reason behind these different ways of writing. As a new user I don't grasp why it couldn't be streamlined as: length(str) / toString(str) / parseInt(str) or with dot formulation.</p>

<p>I however think if I do know the reason behind these differences, it would give me a better understanding of JavaScript.</p>