Javascript examples for Data Type:undefined
Check if undefined with typeof
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w ww .j a v a2 s .c o m function isDef(obj) { var undefined; return !obj === undefined; } var x; function print(x) { document.body.innerHTML += "<p>" + x + "</p>"; }; print(isDef(x)); } </script> </head> <body> </body> </html>