जावास्क्रिप्ट वैश्विक संदर्भ
जावास्क्रिप्ट वैश्विक गुणों और विधियों का उपयोग सभी जावास्क्रिप्ट वस्तुओं के साथ किया जा सकता है।
जावास्क्रिप्ट वैश्विक तरीके
Function | Description |
---|---|
decodeURI() | Decodes a URI |
decodeURI Component() |
Decodes a URI component |
encodeURI() | Encodes a URI |
encodeURI Component() |
Encodes a URI component |
escape() | Deprecated. Use instead: encodeURI() encodeURIComponent() |
eval() | Evaluates a string and executes it as if it was script code |
isFinite() | Determines whether a value is a finite, legal number |
isNaN() | Determines whether a value is an illegal number |
Number() | Converts an object's value to a number |
parseFloat() | Parses a string and returns a floating point number |
parseInt() | Parses a string and returns an integer |
String() | Converts an object's value to a string |
unescape() | Deprecated. Use instead: decodeURI() decodeURIComponent() |
जावास्क्रिप्ट वैश्विक गुण
Property | Description |
---|---|
Infinity | A numeric value that represents positive/negative infinity |
NaN | "Not-a-Number" value |
undefined | Indicates that a variable has not been assigned a value |
ध्यान दें
चूंकि ये विधियां वैश्विक हैं, और वैश्विक वस्तु ब्राउज़र विंडो है, ये विधियां वास्तव में विंडो विधियां हैं:
isNaN () window.isNaN () के समान है।