title: Deleteing characters from end of a file in Nodejs
body: <p>I am using <code>fs</code> module's <code>appendFile()</code> function to append JSON data to a file.</p>
  
  <p>After appending I need to delete the last character from the file and append a new character. I tried to use <code>\b</code> escape sequence to delete the last character but it did'nt work.</p>
  
  <p>Besides it would be very helpful to know how to edit characters in the middle of the file.</p>