javascript map delete item else modify value code example Example: js delete object in map my_map.delete(id)