text:'Wash the floor',
text:'Walk the dog',
Can you share your codepen link ?
There needs to be a comma after ‘Do Homework’
I am getting messages in the console when I threw it in codepen
Then , what’s wrong with my code? How come it’s all red?
Did you understand what @jonathan.roley and @kevinSmith mentioned?
Yes, I switched the todo to todos, however nothing different happened. If it was related to undefined, the console usually would point that out. And I do not understand where’s SyntaxError came from?
That needs to be a comma, not a period.
With that error still in there, the line after that is highlighted. That is CP telling you there is a problem. If you press on the red error icon, it says that there is a syntax error with the colon. Really that means that there is a syntax error before it that prevents JS from being able to properly parse the code.
Thank you!!! But I was hoping just the ‘Do homework’ and ‘Walk the dog’ would show up in the console, see what I got. How come all those " " show up as well?
[// [object Object]
"text": "Walk the dog",
},// [object Object]
"text": "Do homework",
I’m not sure what you mean. Do you mean the double quote signs? I assume that CP converts it to JSON. I don’t know - I normally use the browser console.
I see. Would you please tell me where can I just code and see the result, I need to practice.
It’s not that much different from what you see in the browser console. I often use codepen to try out little JS things. If I need to do more complicated things, I will open out a terminal window and work in a Node environment.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.