David Kimura PRO said 7 months ago on Password Strength :
I think the let charsets = 1 is the right thing since in the array we are including the count column in the first place so it has to be offset. You can also add some console logs to see what the results are returning which can help troubleshoot further.

    let charsets = 1
    if (hasLowercase) {
      charsets++
      console.log("hasLowercase character found.")
    }
    if (hasUppercase) {
      charsets++
      console.log("hasUppercase character found.")
    }
    if (hasNumbers) {
      charsets++
      console.log("hasNumbers character found.")
    }
    if (hasSymbols) {
      charsets++
      console.log("hasSymbols character found.")
    }