1
const checkLen = (password) => password.length >= 8;3
const checkSmallLetter = (password) => {4
for (let i = 0; i < password.length; i++) {5
const ind = password.charCodeAt(i);6
if (ind > 96 && ind < 123) {13
const checkCapitalLetter = (password) => {14
for (let i = 0; i < password.length; i++) {15
const ind = password.charCodeAt(i);16
if (ind > 64 && ind < 91) {23
const checkDigit = (password) => {24
for (let i = 0; i < password.length; i++) {25
const ind = password.charCodeAt(i);26
if (ind > 47 && ind < 58) {33
const checkSpecialChar = (password) => {34
const str = "!@#$%^&*()-+";35
for (let i = 0; i < str.length; i++) {36
if (password.includes(str[i])) return true;41
const checkAdjacentMatches = (password) => {42
for (let i = 1; i < password.length; i++) {43
if (password[i] === password[i - 1]) return false;48
var strongPasswordCheckerII = function (password) {49
const lenValidity = checkLen(password);50
const smallLetterValidity = checkSmallLetter(password);51
const capitalLetterValidity = checkCapitalLetter(password);52
const digitValidity = checkDigit(password);53
const specialCharValidity = checkSpecialChar(password);54
const adjacentMatchesValidity = checkAdjacentMatches(password);56
const passwordIsStrong =58
smallLetterValidity &&59
capitalLetterValidity &&61
specialCharValidity &&62
adjacentMatchesValidity;64
return passwordIsStrong;