Primitive Data Types

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.36
List Price:  €68.73
You save:  €34.37
£29.84
List Price:  £59.69
You save:  £29.85
CA$55.08
List Price:  CA$110.18
You save:  CA$55.10
A$61.41
List Price:  A$122.85
You save:  A$61.43
S$51.52
List Price:  S$103.05
You save:  S$51.53
HK$312.13
List Price:  HK$624.35
You save:  HK$312.21
CHF 32.19
List Price:  CHF 64.39
You save:  CHF 32.20
NOK kr400.12
List Price:  NOK kr800.35
You save:  NOK kr400.22
DKK kr256.45
List Price:  DKK kr512.97
You save:  DKK kr256.51
NZ$68.27
List Price:  NZ$136.57
You save:  NZ$68.29
د.إ146.86
List Price:  د.إ293.76
You save:  د.إ146.90
৳4,869.27
List Price:  ৳9,739.76
You save:  ৳4,870.49
₹3,524.71
List Price:  ₹7,050.30
You save:  ₹3,525.59
RM169.27
List Price:  RM338.59
You save:  RM169.32
₦61,275.07
List Price:  ₦122,565.47
You save:  ₦61,290.40
₨11,351.57
List Price:  ₨22,705.99
You save:  ₨11,354.41
฿1,295.43
List Price:  ฿2,591.19
You save:  ฿1,295.76
₺1,645.70
List Price:  ₺3,291.82
You save:  ₺1,646.11
B$217.74
List Price:  B$435.55
You save:  B$217.80
R708.73
List Price:  R1,417.64
You save:  R708.90
Лв67
List Price:  Лв134.02
You save:  Лв67.01
₩55,770.52
List Price:  ₩111,554.98
You save:  ₩55,784.46
₪135.60
List Price:  ₪271.25
You save:  ₪135.64
₱2,298.32
List Price:  ₱4,597.22
You save:  ₱2,298.90
¥5,941.06
List Price:  ¥11,883.61
You save:  ¥5,942.55
MX$750.26
List Price:  MX$1,500.70
You save:  MX$750.44
QR146.03
List Price:  QR292.09
You save:  QR146.06
P574.53
List Price:  P1,149.20
You save:  P574.67
KSh5,166.70
List Price:  KSh10,334.70
You save:  KSh5,168
E£1,939.49
List Price:  E£3,879.47
You save:  E£1,939.98
ብር5,681.79
List Price:  ብር11,365.01
You save:  ብር5,683.21
Kz36,469.08
List Price:  Kz72,947.28
You save:  Kz36,478.20
CLP$38,717.51
List Price:  CLP$77,444.71
You save:  CLP$38,727.20
CN¥285.16
List Price:  CN¥570.39
You save:  CN¥285.23
RD$2,516.45
List Price:  RD$5,033.54
You save:  RD$2,517.08
DA5,193.10
List Price:  DA10,387.51
You save:  DA5,194.40
FJ$90.45
List Price:  FJ$180.93
You save:  FJ$90.48
Q306.92
List Price:  Q613.92
You save:  Q307
GY$8,374.04
List Price:  GY$16,750.18
You save:  GY$8,376.14
ISK kr4,933.96
List Price:  ISK kr9,869.16
You save:  ISK kr4,935.20
DH359.99
List Price:  DH720.08
You save:  DH360.08
L664.67
List Price:  L1,329.51
You save:  L664.84
ден2,102.60
List Price:  ден4,205.72
You save:  ден2,103.12
MOP$321.59
List Price:  MOP$643.27
You save:  MOP$321.67
N$703.83
List Price:  N$1,407.84
You save:  N$704.01
C$1,473.65
List Price:  C$2,947.67
You save:  C$1,474.01
रु5,648.69
List Price:  रु11,298.79
You save:  रु5,650.10
S/141.43
List Price:  S/282.89
You save:  S/141.46
K169.54
List Price:  K339.12
You save:  K169.58
SAR150.05
List Price:  SAR300.14
You save:  SAR150.09
ZK946.07
List Price:  ZK1,892.38
You save:  ZK946.31
L174.54
List Price:  L349.12
You save:  L174.58
Kč841.12
List Price:  Kč1,682.46
You save:  Kč841.33
Ft13,613.08
List Price:  Ft27,229.58
You save:  Ft13,616.49
SEK kr378.09
List Price:  SEK kr756.29
You save:  SEK kr378.19
ARS$55,055.52
List Price:  ARS$110,124.81
You save:  ARS$55,069.29
Bs276.68
List Price:  Bs553.44
You save:  Bs276.75
COP$161,780.26
List Price:  COP$323,600.99
You save:  COP$161,820.72
₡20,244.43
List Price:  ₡40,493.93
You save:  ₡20,249.49
L1,048.40
List Price:  L2,097.07
You save:  L1,048.66
₲289,232.23
List Price:  ₲578,536.79
You save:  ₲289,304.56
$U1,600.17
List Price:  $U3,200.74
You save:  $U1,600.57
zł146.62
List Price:  zł293.27
You save:  zł146.65
Already have an account? Log In

Transcript

Welcome back. In JavaScript, there are basically five types of primitive data that can be used in our programs. The first one is strings. So to specify a string in JavaScript, type four, and then, for example, name equals to double quotes, and you type the string inside these quotes, for example, john. So this is the first time. The second one is called integers, or doubles or floats, meaning that an integer just a number and doubles a number with decimal values.

So to specify an integer in JavaScript, you just type var, and then the name of the variable. For example, the height of the person equals to 180 centimeters. And you can also add points point five. So this is how you specify integers in, in JavaScript. The third type of data is called Boolean. So for example, you can type var, and then is man.

And this can be true or false. For example, we want to make, we want to check that person's gender. So we could say True, true for if that person is a man, or false, if that person is not a man or a man, and he or she is a woman. The third type of data primitive data in JavaScript is called undefined. And this case when you create a variable, but you do not give it a value. So for example, we have our address and the value has not been given to this variable.

So in that case, this is going to be undefined Or you could just make make it equals two on the Find. Both are true. The last us primitive data type in JavaScript is called No. and No happens when there are choices, but the user hasn't choosing one. So for example, var car and there are three types of cars, but the user has not choosing any one of them. So in that case, this is going to be no.

So these are the five basic primitive data types in JavaScript.

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.