This lesson, we're going to continue to build out our word scramble application, we need to set up
an array with some words, and this is going to be where we're going to get the words from that we're
going to use a lowercase, all of them.
And these are just string values and I'm just creating some random words.
So we go.
So we've got five words.
So we're going to make this dynamic so we can add more words if we want to, and it's not going to break
any of the application.
So now we've got the button gets clicked and we need to check to see if the button was clicked and we're
going to create a variable.
We can call that in place.
So that's to false.
And when the button gets clicked the first time, we're going to check to see if in play and if there's
no inplay, then we're going to put it in play.
So we're gonna to check to see if inplay is false.
And if it is false, then we're going to update in play to be true so that we can't click it another
time.
And selecting that button object, we're going to update the inner HTML.
We can also do in text as well.
So updating HTML to be guess and it's going to be a string value.
So this is what the user is going to press in order to make their guess.
We also have to unhide the hidden element there.
So let's select our input area so we have our guests input area applying a style to it and the style
property is display and setting display to none.
We could do this and that will overwrite that class.
But another way to do that is to select that and use class lists and class list toggle and setting up
the toggle to indicate which class we want to toggle.
And that's the class of hidden.
Let's try that out and refresh hit start.
And there we've got our input.
We've got our guess.
The next thing that we need to do is actually output the message or the word that the player needs to
unscramble.
So it's going to come up in the next lesson and we can do that.
And then also we need to handle the selection and the guests to check to see if it's been correct.
And that way we can simply compare what the selected string value is that we've scrambled compared to
the input.
So all of that is still yet to come.
Add in the ability to update that start button and to start the game, adding in and updating the contents
of the button, as well as toggling the class hidden, removing it from the text area.
So it's visible.