From the course: Code Clinic: JavaScript

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Display solutions

Display solutions

- [Announcer] Alright, so it's time to start displaying our solutions. So, right after this, I'm gonna start by creating a function called display Solution, and it's going to have a solution, or at least be passed along as solution ID. So this is what's gonna show all of the pieces on the board, so we'll create a loop to loop through the different positions. So we're gonna start by looping through all of the available solutions and then in here we'll just do a query Selector and we will find the item with an ID of hashtag plus the index of the solution, so if you take a look at index at html, and you take a look at the board, you'll notice that every sort of square has an ID that corresponds to the letter as well as the number. There's A one, B one, C one, et cetera, et cetera, and then once you get past eight sort of positions, then you start with the A two, et cetera, et cetera, so that's what we're doing here. Alright, so, inside all of the different solution positions here, each…

Contents