Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

toJSON() returns an object #581

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions chapters/03-internals.md
Expand Up @@ -156,15 +156,15 @@ var Todo = Backbone.Model.extend({

var todo1 = new Todo();
var todo1Attributes = todo1.toJSON();
// Following logs: {"title":"","completed":false}
// Following logs: [object Object]
console.log(todo1Attributes);

var todo2 = new Todo({
title: "Try these examples and check results in console.",
completed: true
});

// logs: {"title":"Try these examples and check results in console.","completed":true}
// logs: [object Object]
console.log(todo2.toJSON());
```

Expand Down