Confussed on how notes = JSON.parse(noteString); :          
        
    var addnote = function (title, body) {
          var notes = [];
          var note = {
            title: title,
            body: body
              }

need explanation on the two lines under try
-------------------------------------------

  

      try {
              var noteString = fs.readFileSync("data.json");
              notes = JSON.parse(noteString);
            
            } catch (e) {
            
            }

And explanation on how duplicateNotes works ..
----------------------------------------------

  

      var duplicateNotes = notes.filter(function(note){
              return note.title === title
            })
        
            if (duplicateNotes.length === 0) {
              notes.push(note);
              fs.writeFileSync("data.json", JSON.stringify(notes));
            }
        }


