I'm attempting to create a guessing game where everytime the user clicks a character it will be stored in a variable to form a string. Let's say for example... (c t p i j a r a v s) so if the user clicks J A V A S C R I P T respectively, It will be stored in a variable as "javascript" and will be recognized as the correct answer .and my code looks like this:
clickcount = 0;
$(".gameletter").click(function() {
keyletter = $(this).attr("ID");
vars['m' + clickcount] = keyletter;
clickcount++;
}
});
but I don't know how to combine every keyletter to form a string... Thank you