Answer:
The function of the gerund in the given sentence "I enjoy swimming in the ocean during the summer" is the object of a preposition. The preposition in the sentence is "in" and the gerund phrase "swimming in the ocean during the summer" acts as the object of the preposition.
Step-by-step explanation: