Skip to content Skip to sidebar Skip to footer

Where Are ParseInt() And ParseFloat() Located?

I see parseInt() and parseFloat() when I hit TAB in the console. I can just type: parseInt('123asd'); But where are these located?

Solution 1:

They are properties of the global object. (built-in functions)

In the case of the browser, this is window.


Solution 2:

parseInt and parseFloat are attached to the "Global" javascript object therefore they are available in all contexts.


Post a Comment for "Where Are ParseInt() And ParseFloat() Located?"