Hi
The sample js code provided in Exercise - Write data with output bindings, does not work for adding new item in collection. So the condition for checking if there is a already a bookmark with the requested id, can be changed to be :
" if(bookmark.id){ .... }"