Data Types in JavaScript
-
Data types include:
-
Strings, such as "Internet II", "A", "I love JavaScript!", "232"
-
Numbers, both integer and floating point, such as 75, 1.25, .00232
-
Boolean, true/false
-
null, for unspecified value
-
Use these independently, or in objects.
-
JavaScript automatically changes the variable type, based on context.
-
Will convert a number to a string when "+" is used.
-
use parseInt() or parseFloat() to convert a string. These functions
will convert the numbers in a string, up to the point it reaches a character.
-
NaN value
Strings
Home
Internet II: Day 2