You could use comparison operators to see if it is in the range of digit characters:
var c = justPrices[i].substr(commapos+2,1);
if (c >= '0' && c <= '9') {
// it is a number
} else {
// it isn't
}
More Related Contents:
- How To Display Images Preview and Title When I Paste in Another Site Like Facebook, Whatsapp, etc
- Prototypical inheritance – writing up [duplicate]
- How to get all properties values of a JavaScript Object (without knowing the keys)?
- jQuery .live() vs .on() method for adding a click event after loading dynamic html
- Crockford’s Prototypal inheritance – Issues with nested objects
- endsWith in JavaScript
- Post data to JsonP
- phantomjs not waiting for “full” page load
- How can I get the selected text in a textarea? [duplicate]
- Get the position of a div/span tag
- Password REGEX with min 6 chars, at least one letter and one number and may contain special characters
- Regex created via new RegExp(myString) not working (backslashes)
- Onclick event getting called automatically
- TinyMCE Paste As Plain Text
- Clearing localStorage in javascript?
- How do I clear all options in a dropdown box?
- How to draw a line between two divs?
- Typescript: No index signature with a parameter of type ‘string’ was found on type ‘{ “A”: string; }
- How to get the absolute position of a vertex in three.js?
- dragging and resizing an image on html5 canvas
- Promise : then vs then + catch [duplicate]
- Non-angular page opened after a click
- Calling a Javascript Function from Console
- In Javascript, what does this underscore mean?
- Fill available spaces between labels with dots or hyphens
- strange behaviour of variable named “status” in javascript
- Determine if user navigated from mobile Safari
- Are there differences between .then(functionReference) and .then(function(value){return functionReference(value)})?
- Disable drop paste in HTML input fields? [duplicate]
- ActiveX – Automation Server Can’t Create Object