Let's try : Javascript - Variables

in #ua6 years ago (edited)


Javascript - Variables|Javascript - Змінні




//example 1 | приклад 1;
var name;
Variables
Змінні
The variable consists of the name and allocated memory area that it allocates. To create a variable, the var keyword (example 1) is used. After you have created a variable, it can save data (example 2): Змінна складається з імені та виділеної області пам'яті, яка їй виділяється.Для створення змінної використовується ключове слово var(приклад 1).Після того як ви створили змінну у неї можна зберегти дані(приклад 2):
//example 2 | приклад 2;
var name;
name="John";

or / або

//example 3 | приклад 3;
var name="John";
You even can to write more variabels with one the var keyword Ви навіть можете написати більше змінних з одним ключовим словом var
//example 4 | приклад 4;
var name="John",reputation=45;
The variable name in JavaScript only has two restrictions:
- The name may consist of: letters, numbers, symbols $ and _;
- The first character should not be a digit;
На ім'я змінної в JavaScript діє всього два обмеження:
- Ім'я може складатися з: букв, цифр, символів $ і _;
- Перший символ не повинен бути цифрою;
//example 5 | приклад 5;
var name1,name_1,name123,name435,$name,$n_0;
variables are case sensitive, ie the name and the Name are two different variables.

Important:


- Using the Var directive is an important moment and an obligatory method for declaring variables. Without which there will be errors when working with some versions of Internet Explorer, and the strict Javascript mode will always show an error without var.
імена змінних регістро залежні , тобто name та Name це дві різних змінних.

Добавлю:


- використання директиви var є важливим моментом , та обов'язковим методом оголошення змінних, без неї ви отримаєте помилку при роботі з деякими версіями браузера Internet Explorer, та строгий режим Javascript завжди вкаже на помилку без var.


Дану інформацію ви також знайдете на теренах інтернету.
Інформація буде корисною новачкам, та тим бажає розібратись в цьому питанні.
СТАВТЕ ПАЛЕЦЬ У ВЕРХ!!! ПІДПИСУЙТЕСЬ!!!
КОМЕНТУЙТЕ!!!

You will also find this information on the Internet.
The information will be useful to newcomers.
SUBSCRIBE !!!COMMENT !!!



image source/джерело картинки


Sort:  

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by mandarin2016 from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 56586.53
ETH 2392.96
USDT 1.00
SBD 2.30