Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@just8littleBit my man posted the url 🤣🤣🤣🤣 you made me spit coffee out you magnificent bastard
-
-
function validNumber(str)
if str==“”
return false
foreach char in str
if char != “0”&& char !=“1”....char!=“9”
return false
return true -
@d-fanelli If you want to do a char-wise comparison, you don't use ten comparisons. You just check whether >='0' && <='9'. Or <'0' || >'9' for checking the other way around.
-
@Fast-Nop Thanks! That’s another obvious thing I missed. My brain is totally not on today 😁
-
This took me literally 20 seconds to google and cut and paste from SO.
function hasNumber(myString) {
return /\d/.test(myString);
} -
@HiFiWiFiSciFi cmon, only ridiculous answers are allowed to questions like this
-
C0D4669444y
-
@C0D4 da fuck..
VPNs are your friends I guess 😅
Australia is clearly going to far with their laws, privacy, encryption laws and shit but if it starts affecting people’s everyday life’s it becomes a big ass problem..
I double that google would do it though, governments pay good money for your data.
How do you check if your input string does not have numbers it? If not then say enter a number? JavaScript please
question
javascript