Number Check (isNumeric)

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
€84.80
List Price:  €118.72
You save:  €33.92
£73.15
List Price:  £102.41
You save:  £29.26
CA$136.68
List Price:  CA$191.36
You save:  CA$54.67
A$143
List Price:  A$200.20
You save:  A$57.20
S$127.14
List Price:  S$178
You save:  S$50.86
HK$781.15
List Price:  HK$1,093.65
You save:  HK$312.49
CHF 77.69
List Price:  CHF 108.77
You save:  CHF 31.08
NOK kr967.15
List Price:  NOK kr1,354.05
You save:  NOK kr386.90
DKK kr633.35
List Price:  DKK kr886.72
You save:  DKK kr253.36
NZ$165.87
List Price:  NZ$232.22
You save:  NZ$66.35
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,214.06
List Price:  ৳17,100.18
You save:  ৳4,886.11
₹9,025.73
List Price:  ₹12,636.38
You save:  ₹3,610.65
RM393.21
List Price:  RM550.51
You save:  RM157.30
₦138,728.12
List Price:  ₦194,224.92
You save:  ₦55,496.80
₨27,951.71
List Price:  ₨39,133.51
You save:  ₨11,181.80
฿3,156.95
List Price:  ฿4,419.85
You save:  ฿1,262.90
₺4,348.14
List Price:  ₺6,087.57
You save:  ₺1,739.43
B$522.81
List Price:  B$731.96
You save:  B$209.14
R1,598.76
List Price:  R2,238.33
You save:  R639.57
Лв165.80
List Price:  Лв232.13
You save:  Лв66.32
₩144,844.20
List Price:  ₩202,787.68
You save:  ₩57,943.47
₪308.99
List Price:  ₪432.60
You save:  ₪123.60
₱5,910
List Price:  ₱8,274.24
You save:  ₱2,364.23
¥15,584.92
List Price:  ¥21,819.52
You save:  ¥6,234.59
MX$1,730.78
List Price:  MX$2,423.16
You save:  MX$692.38
QR363.42
List Price:  QR508.80
You save:  QR145.38
P1,322.22
List Price:  P1,851.16
You save:  P528.94
KSh12,898.71
List Price:  KSh18,058.71
You save:  KSh5,160
E£4,694.52
List Price:  E£6,572.51
You save:  E£1,877.99
ብር15,502.71
List Price:  ብር21,704.42
You save:  ብር6,201.70
Kz91,219.87
List Price:  Kz127,711.47
You save:  Kz36,491.60
CLP$86,330.36
List Price:  CLP$120,865.96
You save:  CLP$34,535.60
CN¥693.70
List Price:  CN¥971.20
You save:  CN¥277.50
RD$6,347.79
List Price:  RD$8,887.16
You save:  RD$2,539.37
DA12,995.80
List Price:  DA18,194.64
You save:  DA5,198.84
FJ$220.10
List Price:  FJ$308.15
You save:  FJ$88.05
Q766.59
List Price:  Q1,073.25
You save:  Q306.66
GY$20,909.94
List Price:  GY$29,274.76
You save:  GY$8,364.81
ISK kr12,296.77
List Price:  ISK kr17,215.97
You save:  ISK kr4,919.20
DH916.77
List Price:  DH1,283.52
You save:  DH366.74
L1,682.77
List Price:  L2,355.95
You save:  L673.17
ден5,226.90
List Price:  ден7,317.88
You save:  ден2,090.97
MOP$804.27
List Price:  MOP$1,126.01
You save:  MOP$321.74
N$1,600.79
List Price:  N$2,241.17
You save:  N$640.38
C$3,678.21
List Price:  C$5,149.64
You save:  C$1,471.43
रु14,704.79
List Price:  रु20,587.29
You save:  रु5,882.50
S/336.45
List Price:  S/471.05
You save:  S/134.59
K428.19
List Price:  K599.48
You save:  K171.29
SAR374.94
List Price:  SAR524.94
You save:  SAR149.99
ZK1,961.36
List Price:  ZK2,745.98
You save:  ZK784.62
L432.04
List Price:  L604.88
You save:  L172.83
Kč2,062.86
List Price:  Kč2,888.09
You save:  Kč825.23
Ft32,289.72
List Price:  Ft45,206.90
You save:  Ft12,917.18
SEK kr892.23
List Price:  SEK kr1,249.16
You save:  SEK kr356.92
ARS$144,835.52
List Price:  ARS$202,775.52
You save:  ARS$57,940
Bs696.40
List Price:  Bs975
You save:  Bs278.59
COP$362,990.69
List Price:  COP$508,201.49
You save:  COP$145,210.80
₡49,635.87
List Price:  ₡69,492.20
You save:  ₡19,856.33
L2,640.54
List Price:  L3,696.86
You save:  L1,056.32
₲663,066.42
List Price:  ₲928,319.51
You save:  ₲265,253.09
$U3,854.56
List Price:  $U5,396.54
You save:  $U1,541.97
zł357.81
List Price:  zł500.96
You save:  zł143.14
Already have an account? Log In

Transcript

Hello in this jQuery video I am going to show you the is numeric method. So the is numeric method just checks if the argument provided is a valid number. So if I do console dot log and to do is numeric method has to dollar.is a path in a number here to Pisces six this year return true. Okay so if I duplicate this and I change it to the string hello, this should return okay so far so good. What happens if we do a negative number? Just FYI, let's do like negative 50 635.

So we are doing a negative decimal still says two because that is the number one if I do this quotation marks for a number and this is string It comes up as true. So this is where it gets interesting. So this is the really cool thing about is numeric. So if you, you know, are getting some input from the user, and it's either a string or you've got them from somewhere else, for example, and you want to check if it's a number, but you don't want to do any casting, you can use this. So that way, you can still manipulate this if it's assigned into some variable as a string, we can check it with a number. But what would happen if I were to duplicate this and add, you know, the letter U at the end it call up a fourth because this is no longer a number.

So this is saying, even if not the sentence, these quotation marks when they're 67, you will not be a valid number. So that's the is numeric method in jQuery. Really, really cool, really easy to use, but really, really useful. Thanks for watching, and I look forward to seeing you in the next video.

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.