5. Validate Password Strength

Write a function `isValidPassword` that takes a password string and returns true if it meets the following criteria: - At least 8 characters - Contains at least one uppercase letter - Contains at least one lowercase letter - Contains at least one number - Contains at least one special character (e.g., !@#$%^&*)

Examples:

Input: "Password123!"
Output: true
Explanation: Meets all criteria.
Input: "weakpass"
Output: false
Explanation: No uppercase, number, or special character.
SolutionJavaScript
Test Results
Click "Run Code" to test your solution