Answer the question
In order to leave comments, you need to log in
How to check if the first character in a string is equal to minus or not equal?
How to check if the first character in a string is equal to minus or not equal?
Like if
const str starts with a minus const str = "-2214324141324"
or not
Answer the question
In order to leave comments, you need to log in
Global_Objects/String
At least six methods allow you to do this
Why not convert to a number and check for less than zero?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question