O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.5 DATA TYPES

It is thought that JavaScript lacks the rigor of other languages as compared to Java or C# because they are strongly typed. JavaScript is indeed not a strongly typed language so that makes it flexible and easier to code but on the flip side they are difficult to maintain because of the lack of typing. However, the client-side JavaScripts are shorter in size, and hence the rigor is actually not necessary thus benefiting in the overall context. Having said that, the types of values that JavaScript can handle, called Datatypes, can be thought of as being organized as follows.

  • Primitive Datatypes
    • Numbers
    • Strings
    • Boolean
  • Trivial Datatypes
    • Null
    • Undefined (variable not declared is undefined, or a variable declared but not initialized) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required