Looping through arrays in javascript

var books = ["Harry Potter","Brave New World","A Fraction of the whole"];
var bookCount = books.length;
for (var i = 0; i < bookCount; i++) {
        console.log(books[i]);
}