Global Scope - Discussion

1 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€90.41
List Price:  €126.58
You save:  €36.16
£77.55
List Price:  £108.58
You save:  £31.02
CA$140.73
List Price:  CA$197.03
You save:  CA$56.30
A$162.41
List Price:  A$227.38
You save:  A$64.97
S$133.89
List Price:  S$187.46
You save:  S$53.56
HK$776.03
List Price:  HK$1,086.48
You save:  HK$310.44
CHF 84.31
List Price:  CHF 118.04
You save:  CHF 33.72
NOK kr1,085.98
List Price:  NOK kr1,520.42
You save:  NOK kr434.43
DKK kr674.94
List Price:  DKK kr944.94
You save:  DKK kr270
NZ$176.07
List Price:  NZ$246.51
You save:  NZ$70.43
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳12,139.01
List Price:  ৳16,995.10
You save:  ৳4,856.09
₹8,621.41
List Price:  ₹12,070.32
You save:  ₹3,448.91
RM446.75
List Price:  RM625.47
You save:  RM178.72
₦157,884.21
List Price:  ₦221,044.21
You save:  ₦63,160
₨28,067.19
List Price:  ₨39,295.19
You save:  ₨11,228
฿3,418.50
List Price:  ฿4,786.04
You save:  ฿1,367.54
₺3,794.68
List Price:  ₺5,312.71
You save:  ₺1,518.02
B$591.39
List Price:  B$827.97
You save:  B$236.58
R1,946.45
List Price:  R2,725.11
You save:  R778.65
Лв177.06
List Price:  Лв247.89
You save:  Лв70.83
₩146,283.52
List Price:  ₩204,802.78
You save:  ₩58,519.26
₪376.03
List Price:  ₪526.46
You save:  ₪150.42
₱5,739.87
List Price:  ₱8,036.05
You save:  ₱2,296.17
¥14,600.11
List Price:  ¥20,440.74
You save:  ¥5,840.63
MX$2,037.42
List Price:  MX$2,852.47
You save:  MX$815.05
QR364.26
List Price:  QR509.98
You save:  QR145.72
P1,407.02
List Price:  P1,969.88
You save:  P562.86
KSh12,928.70
List Price:  KSh18,100.70
You save:  KSh5,172
E£5,129.17
List Price:  E£7,181.05
You save:  E£2,051.87
ብር13,214.94
List Price:  ብር18,501.45
You save:  ብር5,286.50
Kz91,590.84
List Price:  Kz128,230.84
You save:  Kz36,640
CLP$99,133.08
List Price:  CLP$138,790.28
You save:  CLP$39,657.20
CN¥733.85
List Price:  CN¥1,027.42
You save:  CN¥293.57
RD$6,218.41
List Price:  RD$8,706.03
You save:  RD$2,487.61
DA13,331.66
List Price:  DA18,664.86
You save:  DA5,333.20
FJ$231.04
List Price:  FJ$323.46
You save:  FJ$92.42
Q770.61
List Price:  Q1,078.88
You save:  Q308.27
GY$20,903.58
List Price:  GY$29,265.85
You save:  GY$8,362.26
ISK kr13,083.69
List Price:  ISK kr18,317.69
You save:  ISK kr5,234
DH950.05
List Price:  DH1,330.11
You save:  DH380.06
L1,776.34
List Price:  L2,486.95
You save:  L710.60
ден5,570.91
List Price:  ден7,799.50
You save:  ден2,228.59
MOP$796.18
List Price:  MOP$1,114.69
You save:  MOP$318.50
N$1,970.42
List Price:  N$2,758.67
You save:  N$788.24
C$3,676.63
List Price:  C$5,147.43
You save:  C$1,470.80
रु13,680.44
List Price:  रु19,153.16
You save:  रु5,472.72
S/374.18
List Price:  S/523.87
You save:  S/149.68
K412.67
List Price:  K577.75
You save:  K165.08
SAR375.32
List Price:  SAR525.46
You save:  SAR150.14
ZK2,806.67
List Price:  ZK3,929.45
You save:  ZK1,122.78
L450.04
List Price:  L630.08
You save:  L180.03
Kč2,269.98
List Price:  Kč3,178.07
You save:  Kč908.08
Ft36,691.13
List Price:  Ft51,369.05
You save:  Ft14,677.92
SEK kr996.61
List Price:  SEK kr1,395.30
You save:  SEK kr398.68
ARS$107,608.34
List Price:  ARS$150,655.99
You save:  ARS$43,047.64
Bs690.41
List Price:  Bs966.61
You save:  Bs276.19
COP$441,532.32
List Price:  COP$618,162.91
You save:  COP$176,630.59
₡51,391.41
List Price:  ₡71,950.03
You save:  ₡20,558.62
L2,559.35
List Price:  L3,583.19
You save:  L1,023.84
₲799,524.93
List Price:  ₲1,119,366.89
You save:  ₲319,841.95
$U4,283.37
List Price:  $U5,996.89
You save:  $U1,713.51
zł384.19
List Price:  zł537.89
You save:  zł153.69
Already have an account? Log In

Transcript

Well, let's circle back and talk a little bit more specifically about global scope. global scope is also known as the window object or outermost scope or top level scope. Basically, global scope is any code that is not in a function. So for example, I've got some code here on the left. And as you can see, I've got a couple of variables at the top. And I've got two functions foo and bar and then at the bottom, the code execute those functions.

So the variables speed and greeting and the functions foo and bar. And the execution of those functions are global code. They are defined in the global scope. And that's because they're not defined in a function. So the code that's inside of the Foo and bar function is not global code, because that code is defined inside of a function. So in this case, I've got a variable called app and this app is a private variable.

Because it's defined inside of a function. So it's really important to remember that global scope is any code that is not defined in a function.

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.