Javascript regex 101: String.test()
var containsOnlyDigits = function(string) {
return !/D/.test(number);
} </code>
Basically: /regex/.test("hits regexes")
returns true.
var containsOnlyDigits = function(string) {
return !/D/.test(number);
} </code>
Basically: /regex/.test("hits regexes")
returns true.