messages completed in javascript