Pug template engine dropdown(select) query

Hi,

I’m following the local library project on MDN as in the link below
Local Library

In the project pug template engine is used for the views. In the below code, could you please explain what does if bookinstance mean?

form(method="POST" action='')
    div.form-group
      label(for='book') Book:
      select#book.form-control(type='select' placeholder='Select book' name='book' required='true')
       - book_list.sort(function(a, b) {let textA = a.title.toUpperCase(); let textB = b.title.toUpperCase(); return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;});
       for book in book_list
        if bookinstance
          option(value=book._id selected=(bookinstance.book.toString()==book._id.toString() ? 'selected' : false)) #{book.title}
        else
          option(value=book._id) #{book.title}

Thanks
Jag