Each language has basic data types known as primitive types. You will be using these types extensively as you program in Javascript.
I won't go into too much detail on each one but will just give some basic information.
The first type is boolean. This only has two values: true or false.
Next is null. This means it is nothing and will evaluate as false.
There is also a number type. This includes integers (1, 2, 3...), floating-point numbers (1.2, 2.3, 5.3), and doubles (same as floating-point in JavaScript). JavaScript doesn't have the concept of doubles and floats like other languages have.
Another type is the string type. This is any text you display or receive from HTML input like ("Hello World!");
Finally, there is the undefined type. If something isn't defined it is undefined. You can even do something like var x = undefined;, though you could argue that it is not longer undefined because you just defined it. This will also evaluate as false.
Hopefully you have a better understanding of the basic data types of JavaScript.
Thanks for such a pleasant post. This post loaded with lots of useful information. Keep it up. If you are looking for the best information and suggestions related to Web Design And Development Agency then visit DP Websolutions.
ReplyDelete