filmov
tv
JavaScript DataTypes in Tamil| String/Undefined/Null Difference| JavaScript Tutorial in Tamil

Показать описание
JavaScript datatypes do two things:
1. It tells JavaScript if a data is processable.
30
2. It tells JavaScript how to process a data.
Datatypes in JavaScript
Before we proceed, let me explain why we are learning this.
The datatype of a given data tells JavaScript how to process the data. In order words, the
datatype determines the things JavaScript can do to a data. When you do something to a data,
it is known as an operation. It therefore means that the datatype of a data determines the kind
of operation JavaScript can perform on the data.
In this book, I will be explaining 5 datatypes in JavaScript.
1. Number
2. Boolean
3. String
4. Undefined
5. Object
i. Null
ii. Array
iii. Object
There is an inbuilt command in JavaScript to check the datatype of any value. The command
is: typeof.
Number: In JavaScript, a number can either be a whole number or a floating number
(a number that contains decimal point).
It means: 5, 7, 109, 8.6, 52.06 are all classified as numbers in JavaScript.
Run these codes on your browser:
1. alert(typeof(3.21));
2. alert(typeof(123.456));
3. alert(typeof(32.1));
A variable automatically takes the datatype of the value it holds.
2. Boolean: A Boolean has only two values. It is either true or false.
You can use single quote or double quotes, whichever you are more comfortable with.
Anything you place within quotation marks is known as a string.Undefined and null are similar in usage even though they are of different
datatypes. While undefined is a datatype, null is an object.
#javascriptintamil #htmlintamil #cssintamil #webtechnologies
🔔Like, Subscribe My Channel👍
1. It tells JavaScript if a data is processable.
30
2. It tells JavaScript how to process a data.
Datatypes in JavaScript
Before we proceed, let me explain why we are learning this.
The datatype of a given data tells JavaScript how to process the data. In order words, the
datatype determines the things JavaScript can do to a data. When you do something to a data,
it is known as an operation. It therefore means that the datatype of a data determines the kind
of operation JavaScript can perform on the data.
In this book, I will be explaining 5 datatypes in JavaScript.
1. Number
2. Boolean
3. String
4. Undefined
5. Object
i. Null
ii. Array
iii. Object
There is an inbuilt command in JavaScript to check the datatype of any value. The command
is: typeof.
Number: In JavaScript, a number can either be a whole number or a floating number
(a number that contains decimal point).
It means: 5, 7, 109, 8.6, 52.06 are all classified as numbers in JavaScript.
Run these codes on your browser:
1. alert(typeof(3.21));
2. alert(typeof(123.456));
3. alert(typeof(32.1));
A variable automatically takes the datatype of the value it holds.
2. Boolean: A Boolean has only two values. It is either true or false.
You can use single quote or double quotes, whichever you are more comfortable with.
Anything you place within quotation marks is known as a string.Undefined and null are similar in usage even though they are of different
datatypes. While undefined is a datatype, null is an object.
#javascriptintamil #htmlintamil #cssintamil #webtechnologies
🔔Like, Subscribe My Channel👍