Password Strength Report
hardQuestion 255The array passwords holds several candidate passwords. For each one print <password>: <verdict>. The rules are checked in order and the first failure decides the verdict: too short when the length is under 8; needs a digit when no character is between 0 and 9; needs an uppercase letter when no character is between A and Z; otherwise strong. Scan the characters with a for...of loop over the string and compare characters with >= and <= (string comparison works character by character). Use boolean flags to record what you found.
Expected output
abc: too short sunshineday: needs a digit sunshine7: needs an uppercase letter Sunshine7: strong
= newline. The output ends with a newline, so print one after the last line.
Hints4 available
Sign in to use hintsTopics
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.