JSFiddle - React, Tailwind, and code Playground

by neuroflux

JavaScript

var decypher = "782137829431783498892347847823784728934782389";

var systemPass = "789544";

for (var x = 0; x < decypher.length; x++) { //loop through the array
    var switcher = 0; //not run this row yet
    for (var p = 0; p < systemPass.length; p++) { //loop through each digit in the password
        if(eval(decypher[x]) === eval(systemPass[p])) { //if the password digit matches the array digit
                $('body').append("<p style='color: green; float: left;'>"+decypher[x]+"</p>");
        } else { //no match
                $('body').append("<p style='color: silver; float: left;'>"+decypher[x]+"</p>");
        } 
    }   
}
    

/**
Why the motherf*ck does this only "highlight" the 7s?
**/