Check password strength while typing using JavaScript

[code]var code = document.getElementById("mypassword");var passwordstrength = document.getElementById("password-meter");var display = document.getElementsByClassName("textbox")[0];code.addEventListener("keyup", function() { checkpassword(code.value);});function checkpassword(password) { var…