From the course: Level Up: JavaScript
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Password strength - JavaScript Tutorial
From the course: Level Up: JavaScript
Password strength
(electronic chiming) - Regular expressions or regex are sequences of characters that define a pattern in a string. We can use regular expressions to do things like remove certain characters in a string, or check whether a string matches a set of criteria. In this challenge, you'll build a password validator for a signup form which tests whether or not a user's desired password is strong enough. You must use a regular expression in your solution. If the user's password is strong enough, return the string, your password is valid. Otherwise, return the string, your password is invalid. You must also use a ternary operator to return a boolean value. Ternary operators check to see if a certain condition has been met. We follow the expression we want to check with a question mark, and if the condition is truthy, it will execute the code following the question mark. The truthy expression is followed by a colon and…
Contents
-
-
-
Available books6m 11s
-
(Locked)
Movie object5m 29s
-
(Locked)
Vegetarian dinner3m 11s
-
(Locked)
Technical books2m 33s
-
(Locked)
Private object2m 13s
-
(Locked)
Ticking time2m 17s
-
(Locked)
Classroom attendance3m 14s
-
(Locked)
Dynamic colors4m 15s
-
(Locked)
Coffee calculations3m 21s
-
(Locked)
Food truck3m 4s
-
(Locked)
Train generator3m 31s
-
(Locked)
String permutation3m 11s
-
(Locked)
Five friends3m 43s
-
(Locked)
URLify3m 55s
-
(Locked)
Password strength4m 58s
-