Write a function called isStrongPassword() in script.js that has a single password parameter. The function should return true only if all the following conditions are true: The password is at least 8 characters long. The password does not contain the string "password". Hint: Use indexOf() to search for "password". The password contains at least one uppercase character. Hint: Call the string method charCodeAt(index) to get the Unicode value of each character in the password. If a character code is between 65 and 90 (the Unicode values for A and Z), then an uppercase character is found. If any of the above conditions are false, isStrongPassword() should return false. Below are example calls to isStrongPassword(): isStrongPassword("Qwerty"); // false - Too short isStrongPassword("passwordQwerty") // false - Contains "password" isStrongPassword("qwerty123") // false - No uppercase characters isStrongPassword("Qwerty123") // true To test your code in your web browser, call isStrongPassword() from the JavaScript console.
Answer the given question with a proper explanation and step-by-step solution.
Write a function called isStrongPassword() in script.js that has a single password parameter. The function should return true only if all the following conditions are true: The password is at least 8 characters long. The password does not contain the string "password". Hint: Use indexOf() to search for "password". The password contains at least one uppercase character. Hint: Call the string method charCodeAt(index) to get the Unicode value of each character in the password. If a character code is between 65 and 90 (the Unicode values for A and Z), then an uppercase character is found. If any of the above conditions are false, isStrongPassword() should return false. Below are example calls to isStrongPassword(): isStrongPassword("Qwerty"); // false - Too short isStrongPassword("passwordQwerty") // false - Contains "password" isStrongPassword("qwerty123") // false - No uppercase characters isStrongPassword("Qwerty123") // true To test your code in your web browser, call isStrongPassword() from the JavaScript console.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)