ivanmvh / to-do-list-imvh

In this project we will be using webpack to create, edit, and delete tasks from a list of tasks created by the user, the main goals of this project are: Use webpack to bundle JavaScript. Learn how to use proper ES6 syntax. Use ES6 modules to write modular JavaScript.
2 stars 0 forks source link

JavaScript best practices Do I follow? #5

Open ivanmvh opened 1 year ago

ivanmvh commented 1 year ago
  1. Keep all the JavaScript code in JS files, not in the script tag. (it's ok)
  2. Keep your code clean following this advice about:

-type checks. (I dont know what this mean!)

-naming -- in index.js is ok -- in addTodo.js is ok. -- in list_todos.js is ok -- in removeTodo.js is ok -- in Todos_Data.js is ok -- in Todo_class.js is ok

-simplicity. -- in index.js is ok -- in addTodo.js is ok. -- in list_todos.js ---- todoElement is repeted. (Why? Because debugging code) ---- the rest of the code is very easy to undestand. -- in removeTodo.js is ok -- in Todos_Data.js is ok -- in Todo_class.js is ok

  1. If you use ES6, use object destructuring to get the values from an object. This way you can avoid repeating a lot of code. (I dont know well if I am using this or not!)