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
€86.14
List Price:  €120.61
You save:  €34.46
£74.70
List Price:  £104.58
You save:  £29.88
CA$139.23
List Price:  CA$194.92
You save:  CA$55.69
A$149.59
List Price:  A$209.44
You save:  A$59.84
S$128.84
List Price:  S$180.39
You save:  S$51.54
HK$779.65
List Price:  HK$1,091.55
You save:  HK$311.89
CHF 80.26
List Price:  CHF 112.37
You save:  CHF 32.11
NOK kr1,008.04
List Price:  NOK kr1,411.30
You save:  NOK kr403.25
DKK kr643.31
List Price:  DKK kr900.66
You save:  DKK kr257.35
NZ$173.57
List Price:  NZ$243
You save:  NZ$69.43
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,244.69
List Price:  ৳17,143.06
You save:  ৳4,898.36
₹9,086.09
List Price:  ₹12,720.89
You save:  ₹3,634.80
RM405.70
List Price:  RM568
You save:  RM162.30
₦142,254.84
List Price:  ₦199,162.46
You save:  ₦56,907.62
₨28,017.86
List Price:  ₨39,226.13
You save:  ₨11,208.26
฿3,131.39
List Price:  ฿4,384.07
You save:  ฿1,252.68
₺4,327.38
List Price:  ₺6,058.51
You save:  ₺1,731.12
B$538.39
List Price:  B$753.77
You save:  B$215.38
R1,640.55
List Price:  R2,296.83
You save:  R656.28
Лв168.60
List Price:  Лв236.05
You save:  Лв67.44
₩147,342.26
List Price:  ₩206,285.06
You save:  ₩58,942.80
₪313.59
List Price:  ₪439.03
You save:  ₪125.44
₱5,937.30
List Price:  ₱8,312.46
You save:  ₱2,375.15
¥15,817.91
List Price:  ¥22,145.71
You save:  ¥6,327.80
MX$1,762.41
List Price:  MX$2,467.44
You save:  MX$705.03
QR364
List Price:  QR509.62
You save:  QR145.61
P1,337.07
List Price:  P1,871.96
You save:  P534.88
KSh12,914.13
List Price:  KSh18,080.31
You save:  KSh5,166.17
E£4,709.53
List Price:  E£6,593.54
You save:  E£1,884
ብር15,621.62
List Price:  ብር21,870.90
You save:  ብር6,249.27
Kz91,187.68
List Price:  Kz127,666.40
You save:  Kz36,478.72
CLP$88,341.16
List Price:  CLP$123,681.16
You save:  CLP$35,340
CN¥696.88
List Price:  CN¥975.66
You save:  CN¥278.78
RD$6,378.23
List Price:  RD$8,929.78
You save:  RD$2,551.54
DA12,997.98
List Price:  DA18,197.69
You save:  DA5,199.71
FJ$227.92
List Price:  FJ$319.10
You save:  FJ$91.18
Q767.57
List Price:  Q1,074.63
You save:  Q307.06
GY$20,941.41
List Price:  GY$29,318.82
You save:  GY$8,377.40
ISK kr12,596.21
List Price:  ISK kr17,635.20
You save:  ISK kr5,038.98
DH921.72
List Price:  DH1,290.44
You save:  DH368.72
L1,701.82
List Price:  L2,382.61
You save:  L680.79
ден5,303.42
List Price:  ден7,425
You save:  ден2,121.58
MOP$804.30
List Price:  MOP$1,126.05
You save:  MOP$321.75
N$1,639.23
List Price:  N$2,295
You save:  N$655.76
C$3,684.09
List Price:  C$5,157.87
You save:  C$1,473.78
रु14,532.17
List Price:  रु20,345.62
You save:  रु5,813.45
S/336.40
List Price:  S/470.97
You save:  S/134.57
K427.68
List Price:  K598.77
You save:  K171.09
SAR374.92
List Price:  SAR524.90
You save:  SAR149.98
ZK2,009.79
List Price:  ZK2,813.79
You save:  ZK803.99
L438.16
List Price:  L613.45
You save:  L175.28
Kč2,090.01
List Price:  Kč2,926.10
You save:  Kč836.09
Ft33,246.44
List Price:  Ft46,546.34
You save:  Ft13,299.90
SEK kr921.77
List Price:  SEK kr1,290.52
You save:  SEK kr368.74
ARS$142,935.70
List Price:  ARS$200,115.70
You save:  ARS$57,180
Bs691.75
List Price:  Bs968.48
You save:  Bs276.73
COP$368,986.40
List Price:  COP$516,595.73
You save:  COP$147,609.32
₡48,928.85
List Price:  ₡68,502.35
You save:  ₡19,573.49
L2,640.20
List Price:  L3,696.39
You save:  L1,056.18
₲684,267.94
List Price:  ₲958,002.49
You save:  ₲273,734.55
$U3,860.51
List Price:  $U5,404.87
You save:  $U1,544.36
zł364.01
List Price:  zł509.63
You save:  zł145.62
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.