Check if undefined with typeof - Javascript Data Type

Javascript examples for Data Type:undefined


Check if undefined with typeof

Demo Code

ResultView the demo in separate window

      <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>";


Related Tutorials