title: How make the register button enable only if password strength is good or strong?
body: <p>I am using the ZXCVBN.js for password strength. It is working as expected. But I want to enable the register button only if the strength of password displays good or strong.</p>
  
  <p>Here is a working <a href="http://codepen.io/anon/pen/jrdRwk" rel="nofollow noreferrer">codepen</a>.</p>
  
  <pre><code> var strength = {
   0: "Worst",
   1: "Bad",
   2: "Weak",
   3: "Good",
   4: "Strong"
   }
  
  var password = document.getElementById('password');
  var meter = document.getElementById('password-strength-meter');
  var text = document.getElementById('password-strength-text');
  
  password.addEventListener('input', function() {
  var val = password.value;
  var result = zxcvbn(val);
  
  meter.value = result.score;
  
      if (val !== "") {
  text.innerHTML = "Strength: " + strength[result.score]; 
  } else {
  text.innerHTML = "";
  }
  });
  </code></pre>