What are Variables - 1

2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$39.99
List Price:  $79.99
You save:  $40
€34.22
List Price:  €68.45
You save:  €34.23
£29.71
List Price:  £59.44
You save:  £29.72
CA$54.74
List Price:  CA$109.50
You save:  CA$54.76
A$60.91
List Price:  A$121.83
You save:  A$60.92
S$51.22
List Price:  S$102.45
You save:  S$51.23
HK$313.92
List Price:  HK$627.91
You save:  HK$313.99
CHF 31.82
List Price:  CHF 63.66
You save:  CHF 31.83
NOK kr406.26
List Price:  NOK kr812.62
You save:  NOK kr406.36
DKK kr255.41
List Price:  DKK kr510.90
You save:  DKK kr255.48
NZ$66.68
List Price:  NZ$133.37
You save:  NZ$66.69
د.إ146.88
List Price:  د.إ293.80
You save:  د.إ146.92
৳4,848.44
List Price:  ৳9,698.10
You save:  ৳4,849.65
₹3,431.86
List Price:  ₹6,864.59
You save:  ₹3,432.72
RM169.63
List Price:  RM339.31
You save:  RM169.68
₦61,314.66
List Price:  ₦122,644.66
You save:  ₦61,330
₨11,404.71
List Price:  ₨22,812.27
You save:  ₨11,407.56
฿1,296.05
List Price:  ฿2,592.43
You save:  ฿1,296.38
₺1,608.40
List Price:  ₺3,217.22
You save:  ₺1,608.81
B$223.69
List Price:  B$447.44
You save:  B$223.75
R711.79
List Price:  R1,423.77
You save:  R711.97
Лв66.91
List Price:  Лв133.84
You save:  Лв66.93
₩55,108.97
List Price:  ₩110,231.72
You save:  ₩55,122.75
₪133.85
List Price:  ₪267.73
You save:  ₪133.88
₱2,267.95
List Price:  ₱4,536.47
You save:  ₱2,268.51
¥5,906.73
List Price:  ¥11,814.95
You save:  ¥5,908.21
MX$747.32
List Price:  MX$1,494.82
You save:  MX$747.50
QR146.08
List Price:  QR292.19
You save:  QR146.11
P534.62
List Price:  P1,069.39
You save:  P534.76
KSh5,166.70
List Price:  KSh10,334.70
You save:  KSh5,168
E£1,975.45
List Price:  E£3,951.41
You save:  E£1,975.95
ብር5,486.33
List Price:  ብር10,974.03
You save:  ብር5,487.70
Kz36,469.08
List Price:  Kz72,947.28
You save:  Kz36,478.20
CLP$38,729.51
List Price:  CLP$77,468.71
You save:  CLP$38,739.20
CN¥286.84
List Price:  CN¥573.76
You save:  CN¥286.92
RD$2,414.11
List Price:  RD$4,828.83
You save:  RD$2,414.71
DA5,192.36
List Price:  DA10,386.02
You save:  DA5,193.66
FJ$89.78
List Price:  FJ$179.59
You save:  FJ$89.80
Q307.81
List Price:  Q615.70
You save:  Q307.89
GY$8,379.85
List Price:  GY$16,761.80
You save:  GY$8,381.94
ISK kr4,873.18
List Price:  ISK kr9,747.58
You save:  ISK kr4,874.40
DH360.53
List Price:  DH721.16
You save:  DH360.62
L675.85
List Price:  L1,351.87
You save:  L676.02
ден2,109.18
List Price:  ден4,218.89
You save:  ден2,109.70
MOP$323.98
List Price:  MOP$648.04
You save:  MOP$324.06
N$715.74
List Price:  N$1,431.66
You save:  N$715.92
C$1,474.64
List Price:  C$2,949.66
You save:  C$1,475.01
रु5,508.33
List Price:  रु11,018.05
You save:  रु5,509.71
S/142.42
List Price:  S/284.89
You save:  S/142.46
K165.72
List Price:  K331.49
You save:  K165.76
SAR149.97
List Price:  SAR299.99
You save:  SAR150.01
ZK929.60
List Price:  ZK1,859.43
You save:  ZK929.83
L173.83
List Price:  L347.70
You save:  L173.87
Kč844.10
List Price:  Kč1,688.42
You save:  Kč844.32
Ft13,694.90
List Price:  Ft27,393.23
You save:  Ft13,698.32
SEK kr384.90
List Price:  SEK kr769.90
You save:  SEK kr385
ARS$51,147.21
List Price:  ARS$102,307.21
You save:  ARS$51,160
Bs277.86
List Price:  Bs555.80
You save:  Bs277.93
COP$160,231.40
List Price:  COP$320,502.87
You save:  COP$160,271.47
₡20,224.98
List Price:  ₡40,455.02
You save:  ₡20,230.04
L1,052.21
List Price:  L2,104.69
You save:  L1,052.47
₲310,415.66
List Price:  ₲620,908.94
You save:  ₲310,493.28
$U1,629.82
List Price:  $U3,260.06
You save:  $U1,630.23
zł145.55
List Price:  zł291.14
You save:  zł145.59
Already have an account? Log In

Transcript

So now we are going to talk about variables and memory location. But before we define variables, you need to understand that any variable you create in JavaScript is going to be stored in a specific location in your computer. So for example, if you want to create a variable called XP, it's going to be stored in a specific memory location in your computer. And memory locations work like labels. Whenever you store some variable in your computer, it's going to label that box that you are going to store that variable in with that memory location so that whenever you want to retrieve that variable, it's going to know exactly which which memory location to bring you, so that it brings you the best Double that you want. And I'm going to give you a very good example that illustrates this process.

Suppose that you want to store a bunch of books inside some box and you have many many boxes at your home. You will have to label that box that you are going to store your books in with some kind of label and you are given you are going to write on that label just a word some some kind of word like books, so that whenever you want to retrieve and know exactly which box that contains your books, you know exactly that. This specific box contains your books. So you have to give some kind of label so that you will be able to retrieve that box easily without spending a lot of time searching through a lot Have boxes that you have. computers do the same with our variables. They have a lot of variables and each variable has some kind of memory location which is a label and whenever you create a variable, it just assigns a memory location.

So whenever you want to retrieve that variable, it knows which memory location location to bring you

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.