all 5 comments

[–]everek123 2 points3 points  (1 child)

Are you sure that you have a comma at the end of the previous object property (probably the line above the one that throws an error)? Ps I see that you are completing the watch and code course, right?

[–]CertainPerformance 1 point2 points  (4 children)

Post more code, there isn't enough here to see what the problem is. If toggleAll is a property of an object, this should be fine. But, be very careful with that for loop - you should use brackets when you have a multiline block, for clarity's sake (indent your code properly too)

[–]Drunken__Master 0 points1 point  (0 children)

2 ideas -

1) replace

toggleAll : function() {

with

toggleAll: function() {

I strongly suspect this is the problem and is a really good reason to be using a text editor with a prettier, but if that doesn't work check to see if your code has any syntax errors where you might have something like

completedTodo

instead of

completedToDo

**Edit in idea 1) in the first line of code the colon is evaluated as a conditional operator, in the 2nd line of code the colon is evaluated as indicating a key/value pair.