I am a very beginner in Javascript / Jquery and my task is to make a "guess the word game"
I have no idea how to mix letters in a word and then how to put one letter of a word per button.
I have an array of words which length is 6 letters. When user clicks "start" button a random word of the whole array is being taken. This is the code of it :
var words = ["abacus", ".....", "zygote"]
$( "#start" ).on('click', function() {
var rand = Math.floor( Math.random() * words.length );
alert(words[rand]);
});
This is what I've got so far. Alert is just to check if the code is right. So the actual task for me is to mix characters in the word I've got and then spread it for 6 buttons.
I am not asking for a code, just for possible solutions but anything would be appreciated Thanks in advance,