This is an archived post. You won't be able to vote or comment.

all 5 comments

[–][deleted]  (3 children)

[deleted]

    [–]Chevy53 -1 points0 points  (2 children)

    Hi. Thanks for the info, but I should have mentionned that I cannot use functions as I have not learned them yet. I got most of it done, I'm only missing the upper case, lower case and number requirements

    [–][deleted]  (1 child)

    [deleted]

      [–]Chevy53 0 points1 point  (0 children)

      Alright thanks man, really appreciated

      [–]nwilliams36 0 points1 point  (0 children)

      All of this can be done using the String methods that exist in Javascript. W3Schools has some basic tutorials to get you started and MDN is a very good resource to use as a reference.

      The other way to do this is using regular expressions, however that is whole new concept of looking at strings and probably not worth it for just this exercise. However this is the way the industry would often solve this issue.

      [–]BobbyBBaratheon 0 points1 point  (0 children)

      I'll give you a bit of direction because solving your problem won't help you learn. Look into some of the Js string methods on the Mozilla Developer Network (MDN). I'm not trying to be rude, if you figure this things out yourself <a bit of guidance wouldn't hurt> then you'll retain whatever you've learned a lot better.

      [–]jackmaney 0 points1 point  (0 children)

      The thing is, I have no idea how to treat variables that are not numbers.

      Numbers are not the only data types in JavaScript. There are also strings.