let books = [

  { id: 1, title: "War and Peace", author: "Leo Tolstoy" },

  { id: 2, title: "The Old Man and the Sea", author: "Ernest Hemingway" },

  { id: 3, title: "The Republic", author: "Plato" },

  { id: 4, title: "Meditations", author: "Marcus Aurelius" },

  { id: 5, title: "Anna Karenina", author: "Leo Tolstoy" },

  { id: 6, title: "A Farewell to Arms", author: "Ernest Hemingway" },

];


function checkAuthor(input) {

    for(var i = 0 ; i < books.length; i++) {

       return books[i].author === input;

    };  

}


checkAuthor("Plato")


이거 왜 자꾸 false라고 나오는 건가여??

id3에 Plato가 있으니까 배열 순차적으로 돌면서 확인하고 

true로 나와야하는 거아닌가요?