Does anyone know why we use books?


#1

Does anyone know why for the variable firstBook we use books.getFirstEntity();

shouldn't it be book.getFirstEntity();

I don't know why its books since we don't have anything called books

    client.createCollection(options, function(error, books){
        if(error) {
            $("#response").append("Error");
        } else {
            //Get the first entity of the collection here.
            var firstBook = books.getFirstEntity();
            //Use the get() function to get the title of your book here
            var title = firstBook.get("title");
            //Use the get() function to get the uuid of your book here
            var uuid = firstBook.get("uuid");
            $("#response").append("Your book title is: "+title+" it's uuid is: "+uuid);
        }
    });

#2

books is an input for your function. :slightly_smiling: