Skip to content

Refactor in main.js #1

Open
Open
@ahmedtaa

Description

in this review:

  • This code is repeated and you should refactor it, you should not repeat yourself and follow the principle of DRY.

bookList.innerHTML = `<li>
<h3> ${titleValue} </h3>
<p>by - ${authorValue} </p>
<input type="button" value="Remove" id="${bookId}" class="removeBook" onClick="removeBook('${bookId}')"/>
</li>${bookList.innerHTML}`;

  • Also please update the readme file.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions