Write three sentences, each using a comma in a different way. Explain why the comma is needed in each sentence

1. Before we left for the airport, I double-checked my passport to ensure I had packed it.

- The comma is needed here to separate the introductory clause "Before we left for the airport" from the main clause "I double-checked my passport."

2. The cake, which was made from scratch, was a hit at the party.

- The comma is needed here to set off the non-essential clause "which was made from scratch" to provide additional information about the cake.

3. She walked through the door, smiled at the guests, and made her way to the dance floor.

- The commas are needed here to separate items in a list of actions the subject performed as she entered the room.