CJCoding With Joseph
15free / daySign inCreate account

Password Strength Report

The 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 — print one after the last line.

Hints4 available
Topics:
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.