remove unnecessary comma in javaScript code example