Javascript Tutorial - Javascript Variable & Javascript Data Type | Basic of Javascript Data Types

Published: 09 February 2019
on channel: Learn school online
97
1

Javascript Tutorial - JS Variable & Javascript Data Type | Basic of Javascript Variable & Data Type

Javascript variable is a container for storing data values. In javascript programming, language variable identifies with a unique name. In javascript variable containing which hold reusable data means once you assign a specific literal type to a variable, you can latter reassign the variable you can later assign the variable to host any other type, without type error or any issue.


Variable names are known as identifiers in JavaScript.

Javascript variable is declared with the var keyword.

Like var firstName;

You can declare multiple variables with the same var keyword as following

Var firstName, lastName, age, country;

Javascript Variable Scope

The Javascript variable has two types of scopes

Global Variable
Local Variable

There are some roles for declaring a Javascript Variable
1. Javascript Variable Name can contain letters, digits, dollar sign.
2. Javascript variable name being with a letter.
3. Javascript variable name can also begin with $ and _.
4. Javascript variable name is case sensitive
5. Javascript reserved words cannot be used as a variable name like function, if, else, array.

You use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules.

A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).

Learn Javascript Basic, Javascript Tutorial.

Javascript Language Basic

#variable #datatypes #javascripttutorial

javascript Variable and Data Type

Javascript Variable is a fundamental concept of every programming language.

We can define a Javascript Variable, like a container. In which we can store a value in order to use it.

JavaScript Data Type

Number: Floating point numbers, for decimals and integers.
String: Sequence of characters, used for text.
Boolean: Logical data type that can only be true or false. (Its provide on logical values like the statement is true or false)
Undefined: Datatype of a variable that does not have a value yet.
Null: Also means ‘no existent’

Break Role of Variable Define

1. We can not start a variable with a number like
Var 3year = 3;

2. We can not use the symbol in middle for defining variable name like var john/mark = ‘this is my name’;

3. We can not use reserved javascript keywords as a variable name. Var function = ‘john is my name’;
Also like delete, if, else,




Learn school online is a way to educate online to YouTube viewers. Learn school online provide knowledge, education, and passion for a subject beyond the classroom and share it with audiences worldwide.

Subscribe to our Learn School Online Video YouTube channel to receive notifications when we post new videos.

Browse our PLAYLISTS to find a video series. Click the VIDEOS button on our main channel page to see all our videos.

Youtube Chanel Link:    / learnschoolonline  

for Facebook Video Link
https://www.facebook.com/Learn-School...

for google plus video link
https://plus.google.com/u/1/104161019...


Watch video Javascript Tutorial - Javascript Variable & Javascript Data Type | Basic of Javascript Data Types online without registration, duration hours minute second in high quality. This video was added by user Learn school online 09 February 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 97 once and liked it 1 people.