Skip to content

Commit fcd3296

Browse files
committed
Add info about identifiers names restricctions
1 parent 77d8e02 commit fcd3296

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

JavaScript_Basics/variables.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
// There is only 3 types of variables in javascript
44

5-
let a = "Swapnil"; // New type introduced in ES6. Value of let can change any time.
5+
let userNickname = "Swapnil"; // New type introduced in ES6. Value of let can change any time.
66

7-
a = "Swap76";
7+
userNickname = "Swap76";
88

9-
const pi = 3.14;// New type introduced in ES6. Value of pi now cannot be changed as this is defined as const.
9+
const PI = 3.14;// New type introduced in ES6. Value of pi now cannot be changed as this is defined as const.
1010

11-
var b = 26;// This is Deprecated as this creates many problems in future.
11+
var day26 = 26;// This is Deprecated as this creates many problems in future.
12+
13+
14+
15+
//Tips: *use significatives variables names, example:
16+
// let a = "User's name" for let userNickName = "User's name"
17+
//*CammelCase for a better understaning, JS has case sensitive.
18+
//*Variables names must begin with a letter.
19+
//*write constants with Upper case.

0 commit comments

Comments
 (0)