Objective: Implement a function that evaluates the strength of a password based on certain criteria and returns a strength score or label.
Instructions:
checkPasswordStrength
that takes a password as input.!@#$%^&*
).Example Usage:
console.log(checkPasswordStrength('Password123')); // Output: "Medium"
console.log(checkPasswordStrength('Password@123')); // Output: "Strong"
console.log(checkPasswordStrength('pass')); // Output: "Weak"
Requirements:
Hints:
regular expressions
to check for the presence of numbers, uppercase letters, and special characters.Bonus: