boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

JavaScript typeof Operator Example

Updated on     Kisan Patel

The typeof operator returns the primitive type of the variable.

  • If the variable is of object type or null then it returns objects.
  • If a variable is declared and is not used then its type is undefined.

In the following script we have used typeof operator.

JavaScript[typeof.html]

 <script type="text/javascript"> 
 var Mystr = "Computer";
 var Mynum = 100;
 var Myboolean = false;
 var Myobj;
 var Mynum1; //declared but not assigned any value
 var Myobj1;
 Myobj = new Date();
 Myobj1 = null; //null is taken as object type

 document.write("Mynum = " + typeof(Mynum) + "<br/>");
 document.write("Myboolean = " + typeof(Myboolean) + "<br/>");
 document.write("Myobj = " + typeof(Myobj) + "<br/>");
 document.write("Myobj1 = " + typeof(Myobj1) + "<br/>");
 document.write("Mynum1 = " + typeof(Mynum1) + "<br/>");
 document.write("Mystr = " + typeof(Mystr) + "<br/>");
 </script>

output-javascript2


JavaScript

Leave a Reply