JavaScript global properties and global functions can be used with all built-in JavaScript objects.
JavaScript global properties
Attributes | description |
---|---|
Infinity | It represents a positive / negative infinity value |
NaN | "Not-a-Number" 值 |
undefined | It said it had not assign a value to a variable |
JavaScript Global Functions
Attributes | description |
---|---|
decodeURI () | Kai码 URI |
decodeURIComponent() | Decoding URI component |
encodeURI() | To encode the URI |
encodeURIComponent() | Component of the URI encoding |
escape() | Deprecated in version 1.5. Use the encodeURI () or encodeURIComponent () |
eval() | Calculation string and executes it as if it is the same script code |
isFinite () | Determine if value is limited legitimate digital |
isNaN() | Determine if value is invalid digit |
Number() | Converting the object into a digital value |
parseFloat() | Parse the string and returns a float |
parseInt() | Parse a string and returns an integer |
String() | Converting the object into a string value |
unescape() | Deprecated in version 1.5. Use the decodeURI () or decodeURIComponent () |
Using functions or properties?
Call the above method global function instead of the global property makes sense because the function is called a global, rather than any object. In any case, you can call these functions methods, because they are the way to run their global object. In the web browser, the browser window is the global object. So isNaN () method is actually a window: window.isNaN ().