2 - JavaScript Variables | JavaScript Tutorial for Beginners

preview_player
Показать описание
How do you add JavaScript to your page?
By using script tag.

Script tags can be placed in the body, or in the head section of an HTML page, or in both.

JavaScript output statements:

JavaScript Variables:
By using var keyword, we can declare variables.
A JavaScript variable can hold any type of data like numbers, strings, boolean etc..

Variable name declaration rules:
Names Contain letters, digits, underscores, and dollar signs.
Names must begin with a letter
Names can also begin with $ and _ (but we will not use it in this tutorial)
Names are case sensitive.
Reserved words (like JavaScript keywords) cannot be used as names

examples of valid variables
var institute = 'Gophp';
var city = 'Hyderabad';
var pincode = 500038
var price = 789.58;
var status = true;
Рекомендации по теме
Комментарии
Автор

it's just an appreciation comment explanation is awesome, looking forward to accomplish all the js videos.

kottejaswanth
join shbcf.ru