Are you ready to turn this into a game we ran through the most important part of this application,
the last lesson, and that's where we're randomizing the order of items and contents of an array, I
got to remove some of these console messages as we don't need them within our finished product.
And I'm going to update this one here to output the content of the message, and I'm going to also create
a global object called Scramble, and we'll start that out by being blank.
And then when we start out and then take our message object and enter HTML update that value of scramble
to be displayed there for the user to be able to see to values that we need to store.
And this one, the scramble value is going to be the actual word.
And we'll set up another object, another variable that we can contain scrambled.
And this is going to be the scrambled word.
So we've got our scramble and then we're going to set another value for scrambled and equal this to
generating that random word, take that value out a variable that we were using.
And we don't need that in place here.
And we're taking whatever the value of scramble is.
And we're going to split that and send that over to our JavaScript.
So randomizing our array value and then instead of putting the scramble, we're going to output the
scrambled.
And we also need to bring this one back together so that it's not an array anymore, so that we can
do with what we saw earlier as well, where we use join in order to join it together.
And so now we get our scrambled word and it's all joined together so we can output.
The scrambled for now will also output the word that's unscrambled as well.
So do we see that this is course this once course as well document.
So coming up next, we need to provide the player the ability to guess at what the word is.
So let's add that in in the next lesson.
So for now, add in and update the scramble part of the word that we worked on the previous lesson,
join it together and then have a scrambled word and a scramble word that's going to be scrambled and
creating a word randomly from our array using the create word function that we created earlier.