Preheat the oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
In a medium bowl, whisk together the flour, baking soda, cinnamon, and salt. Set aside.
In a large mixing bowl, combine the granulated sugar, brown sugar, and vegetable oil. Mix until well combined.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Incorporate the mashed bananas and crushed pineapple into the wet mixture. Mix until evenly combined.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Be careful not to overmix.
If using, fold in the chopped nuts and shredded coconut.
Divide the batter evenly between the prepared cake pans.
Bake for 25-30 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cakes to cool in the pans for 10 minutes before transferring to a wire rack to cool completely.