пробег

const isbnNumbers = new Set();
const createBook = (title, author, isbn) => {
  const book = isbnNumbers.has(isbn);

  if (book) {
    return book;
  }

  const book = new Book(title, author, isbn);
  isbnNumbers.add(isbn);

  return book;
};
Foolish Flamingo