← All challenges
Challenge
Password Strength Meter
Medium- javascript
- forms
Add a strength meter under a password field. As the person types and the password gets stronger, the bar fills more and changes color. The score depends on character variety, not just length.
Notes:
- The starter has
#pw, a.metertrack holding#bar, and an empty#labelyou can use for a word such as Weak or Strong. - An empty field shows an empty bar and no label.
Check your work against
- The meter updates live as the user types, not just on submit
- At least 3 distinct strength levels are visually distinguishable by color
- Scoring considers more than length (e.g. digits, mixed case, symbols)
No automatic grading
Check your work against the list above, then compare it with the solution preview.
Tab indents. Press Esc, then Tab to leave the editor.
Live preview
Starter loaded. The preview updates as you type.