Explain Data Type’s in Java Script?

Programming languages usually have several different types of data commonly programmers may use characters, integers, boolean, strings/ordered set of characters and  reals (complex numbers).

Java script has only four types of data

1) Numeric

2) String

3) Boolean

4) Null.

1) Numeric: These are basic numbers they can be integers such as 56, 289, 5 (or) floating values like 88.91, 86.96….. you do not need to differentiate between them.

2) Strings: These are collection of character’s that are not numbers. The value of a string can even contain spaces and may be totally made from digits.

 Eg: name = “chirs Bates”
        name = ‘chirs Bates’.
        name = “1234”

Nesting strings  one inside another is also possible. The best approach is to use “ “ for the outer string and use ‘ ‘ for all inner strings.

Eg: “Chirs ‘Bates’ ”

3.Boolean: Boolean variables hold the values ‘true’/false’. It is used in conditional test.

4.Null: Null value means that one has not yet been decided. It doesn’t mean null (or) zero.

Related

Web Technology 8494612874586977309

Post a Comment

emo-but-icon

item