additem func on js