backbone-fundamentals
backbone-fundamentals copied to clipboard
Error first run exercise 1
window.app.Todos.create({ title: ’My first Todo item’});
gives me SyntaxError: Unexpected token ILLEGAL
I don't see create on the Todos collection so I am not sure what I am missing.
This is actually caused by #488 - code snippets apparently sometimes use non-ascii apostrophe characters. This can be easily reproduced in browser's JS console: var x = ’My first Todo item’
(github's code highlighting makes it much more evident, if you had used the backticks code highlighting you'd spot the problem immediately)
Try this instead: (replaced with proper "keyboard" apostrophes):
window.app.Todos.create({ title: 'My first Todo item'});