Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

NW6 | Fikret Ellek | JS2 Module | [TECH ED] Build todo-list app | WEEK-4 #228

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fikretellek
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for cute-gaufre-e4b4e5 ready!

Name Link
🔨 Latest commit 2630759
🔍 Latest deploy log https://app.netlify.com/sites/cute-gaufre-e4b4e5/deploys/65b6ed085f32fb0008de514c
😎 Deploy Preview https://deploy-preview-228--cute-gaufre-e4b4e5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

for (const todo of todos) {
const toDoListElement = document.createElement("li");
toDoListElement.innerText = todo.task;
toDoListElement.classList.add(todo.task.replaceAll(" ", "-"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really handy way that every class name is one-of-a-kind :) Just keep in mind, if you add the same todo twice, it might behave differently

deleteBtn.innerText = "Delete";
deleteBtn.classList.add("todo-btn");
deleteBtn.classList.add("delete-btn");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code is well-structured and easy to understand @fikretellek . Great job!

Comment on lines +30 to +33
span.appendChild(doneBtn);
span.appendChild(deleteBtn);
toDoListElement.appendChild(span);
list.appendChild(toDoListElement);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job here!!!! You'll learn much about DOM manipulation in the other modules, but you already follow the best practices, which is to prepare everything with JS and then add one thing to the DOM if possible. You absolutely smashed it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants