Thursday, January 19, 2012

Knowing the Datatype of a Variable

Given a variable to you,how can u know its type
use typeof operator in javascript

eg:-


alert(typeof "Hello World");
alert(typeof 123);

No comments:

Post a Comment