Wednesday, December 26, 2012

Global object


List of global objects are.
  1. eval()
  2. escape()
  3. unescape()
  4. isNaN()
  5. isfinite()
eval() is used to evaluate expression, which is provided within the parenthesis. for example.
eval((2*3)+5); //output is 11
Click on the eval button and try with expression.



escape('informative javascript'); //output is informative%20javascript
Click on the escape button and try with value.


unescape('informative javascript'); //output is informative javascript
Click on the unescape button and try with values.


isNaN(10); this check if the specified number is not a number, the output is false because 10 is a number.
Click on the NaN button and try with values.



isNaN('a'); this is not a number hence it reflects true in the output.
Click on the NaN button and try with value.


isfinite(2334); checks if the entered value is finite or not.output is true in this case.
Click on the Finite button and try with values.



Hope this post was informative , will get back with more posts.


Informative Javascript

No comments:

Post a Comment