update answer for js interview