Welcome in this lesson, we are going to be setting up a hangman game that we're going to utilize and
create JavaScript functionality around first, setting up several debates we're going to need within
our HTML can give them a class.
So we have one where we need several different outputs.
We need one to hold all of the available letters that the player can select.
And then we also need another output that's going to show the solution.
And so all of the letters that the player has guessed correctly, we also need a way to communicate
to the player.
So that's going to be this message area.
So another empty div and all of the stuff we're going to be adding in and functionality with JavaScript,
we also need a way to start the game.
So lets that start button.
So creating all of that is all of the elements within HTML that we need.
So essentially all you see is a start button.
Now we're using JavaScript, so open up within our script tags setting up.
We're going to select all of these elements into JavaScript objects so that we can easily manipulate
them in the upcoming lessons.
So using query selector, we're going to select out the element with a class of message and place that
into an object called message to do the same thing for the output one can using query selector and selecting
the element with a class of output.
One you can duplicate.
This you have to do is so that's output two.
And then lastly, let's also do button so I to do B10 and document and this time we're selecting the
tag with a tag of button.
So that's when we're selecting, they're so ready to add in all of our functionality.
And first, before we do that, we have some global variables that we want to set up.
First, we need an array of words and these are the words that we're going to be using within the game
so you can create your own as well.
So obviously I have to include JavaScript and course.
And let's do one last one.
As Lowrance.
Those are our array of words that we're going to be using.
We need some default functions that we can use.
We can create an object to contain that information.
So under player, because it's going to be unique to the player.
So we can use that as our global object and then pass values that the player needs in order to hold
in there.
So coming up next, we're going to make our button interactive and we're going to start our game functionality.
So let's start to come in the next lesson.
So go ahead and set up your basic core structure and prepare your JavaScript objects for the upcoming
lessons where we've built out this game.