1
00:00:00,420 --> 00:00:01,580
Hello and welcome.

2
00:00:01,670 --> 00:00:07,400
In this video I'll be showing you some variable naming convention.

3
00:00:07,590 --> 00:00:14,670
These are basic rules that you need to follow when giving you a variable names.

4
00:00:14,680 --> 00:00:17,560
So I'm just going to read through this table.

5
00:00:17,610 --> 00:00:25,820
So the first thing to take into account is that variable names can not start with numericable.

6
00:00:25,820 --> 00:00:34,190
For example you can use any number you can name in variable 3 x all 4 cars just for example.

7
00:00:34,380 --> 00:00:36,960
Those will be easily called variable names.

8
00:00:37,210 --> 00:00:42,870
However you can combine the numbers w text he can call it variable.

9
00:00:42,870 --> 00:00:47,510
Maybe cars 4 or go for 8 and things like that.

10
00:00:47,550 --> 00:00:53,350
They are perfect that lead variable and you cannot use operators.

11
00:00:53,360 --> 00:01:02,300
Operators may have a mathematical or logical operators you can't use that in variable name.

12
00:01:02,300 --> 00:01:09,210
For example you can call it variable this block that or this minus dad or D times that you can't do

13
00:01:09,210 --> 00:01:22,550
that you can not use any pointers nation marks of any kind in a javascript variable name that the underscore.

14
00:01:22,860 --> 00:01:27,990
So you can call you a variable car call lawn or car hash.

15
00:01:28,230 --> 00:01:34,230
But you can use an underscore on this call is allowed so you can give a variable name on the score card

16
00:01:34,230 --> 00:01:37,750
for example or something on the score.

17
00:01:37,750 --> 00:01:45,780
Some people think that is allowed javascript variable names must never contain spaces.

18
00:01:45,780 --> 00:01:49,680
Never for example you can't name your variable.

19
00:01:49,680 --> 00:01:53,180
My car spays car does not allowed.

20
00:01:53,190 --> 00:01:57,250
However you can give it my car that is legal.

21
00:01:57,300 --> 00:02:05,000
They can not be any spaces between variable names variable names are case sensitive.

22
00:02:05,040 --> 00:02:14,110
For example if you declare a variable my car is different from a variable called my car or my car.

23
00:02:14,130 --> 00:02:20,760
They are all different variations so when you declare and variable name you got to be careful in the

24
00:02:20,820 --> 00:02:27,900
case you use so that when you want to refer to that variable name you are referencing the corette variable

25
00:02:28,520 --> 00:02:31,130
like having a key to the wrong door.

26
00:02:31,290 --> 00:02:37,380
If you don't have the right key you will not be able to open the door so you must make sure you have

27
00:02:37,380 --> 00:02:41,130
your variable names correct in the current case.

28
00:02:41,130 --> 00:02:52,850
Finally you can use any javascript key key words are part of the javascript language itself.

29
00:02:52,890 --> 00:02:55,090
You can't use any of that variable.

30
00:02:55,440 --> 00:02:59,900
For example a window is the key word in javascript.

31
00:02:59,910 --> 00:03:01,000
Part of the language.

32
00:03:01,140 --> 00:03:06,040
Things like open is part of the language location or string.

33
00:03:06,150 --> 00:03:12,430
Those are part of the as group language so it would be illegal to use them on their own.

34
00:03:12,520 --> 00:03:21,000
However you can use them in combination with other things that are the key word.

35
00:03:20,990 --> 00:03:24,900
For example you can call it variable in that window.

36
00:03:25,140 --> 00:03:33,680
Or maybe my string or whatever you can combine them with a text that is acceptable to all.

37
00:03:33,690 --> 00:03:41,280
These are just some key basic rules you need to take into consideration when you are keeping your variable

38
00:03:41,280 --> 00:03:42,130
names.

39
00:03:42,420 --> 00:03:44,020
That's it for this for you.

40
00:03:44,040 --> 00:03:45,530
Thank you for watching.

41
00:03:45,570 --> 00:03:46,670
Bye for now.
