Preheat oven to 350 degrees. Grease a 9x13 inch baking dish.
In a large bowl, add the carrots, pineapple, coconut, sugar, eggs. oil, and vanilla. Stir to fully combine.
In a separate large bowl, add the flour, baking soda, cinnamon, nutmeg, and salt. Stir to incorporate.
Gradually add the flour mixture to the carrot mixture. Stir to fully combine. If using the pecans, add to the batter and gently stir to incorporate.
Pour the batter into the prepared pan. Bake for 40-45 minutes, or until a toothpick inserted in the center comes out clean. Remove from the oven. Using a toothpick, poke holes evenly in the cake. (This will help the simple syrup absorb.) Allow the cake to cool.