update code js