Data type part 1

Data Types



The term data type refers to the types of values with which a program can work. JavaScript variables can hold many data types, such as numbersstringsarrays, and more.

Unlike many other programming languages, JavaScript does not define different types of numbers, like integers, short, long, floating-point, etc.

JavaScript numbers can be written with or without decimals.var num = 42; // A number without decimals
This variable can be easily changed to other types by assigning to it any other data type value, like num = 'some random string'.
Fill in the blanks to declare a variable age and assign it the number 18:

 
 
 age = 
 
 
;

Comments

Popular posts from this blog

Introducing object part 3

Comparison Operators part 2

Module 2