From the course: Code Clinic: JavaScript

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Storing board solutions

Storing board solutions - JavaScript Tutorial

From the course: Code Clinic: JavaScript

Start my 1-month free trial

Storing board solutions

- [Instructor] So it's finally time to fire everything up, and then start to work with our interface to display some of our items here. So let's start out by saying let myBoard is going to be equal to this new board. So this is calling the method that we created that's going to generate a new board with all of the solutions, and then we're gonna start out by initializing. So myBoard, tryNewQueen, which is the method that fires everything up. And then we're gonna get the amount of solutions we get back from our board. So we'll say solutions quantity is going to be equal to myBoard solutions length. So that's gonna start the board, calculate all the solutions, and then give that back to us in a variable. Once we have that then we can start filling out how our interface displays those elements. So we'll say document querySelector. We're gonna target here the element called currentSolution, inner, and change the HTML of the current solution to one. So what that's gonna do is sort of…

Contents