fac18 / week2-CEFG-To-do

Create a to-do app
https://fac18.github.io/week2-CEFG-To-do/
0 stars 1 forks source link

Variable names #26

Open bobbysebolao opened 4 years ago

bobbysebolao commented 4 years ago

In logic.js, there are a couple of variables that I would suggest renaming:

var newObject = new Object(); (line 28)

var newArray = todoFunctions.cloneArrayOfObjects(todos).filter(x => x.id !== idToDelete); (line 38)

In general, it's good to give variables descriptive names that relate to their content. For someone reading this file, newObject and newArray tell me what type of data they contain, but they don't give you an idea about what the data is. Names like newTodo and clonedTodoList would be more informative!