update the function in javascript 0 with mark down