JavaScript has three primitive data types − Numbers ( such as whole numbers like 5 or decimal numbers like 3.1415) JavaScript makes no distinction between integer values and decimal (floating-point) values. All numbers in JavaScript are represented as decimal (floating-point) values.
Strings of text characters "This is a string of text."
Boolean ( a variable with a value of either true or false.
JavaScript Variables
Like many other programming languages, JavaScript has variables. You can place data into named variables and then refer to the data simply by referring to the name of the variable.
Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows.
<script type="text/javascript">
<!--
var money;
var name;
//-->
</script>
You can also declare multiple variables with the same var keyword as follows −
<script type="text/javascript">
<!--
var money, name;
//-->
</script>