Set the oven temperature to 175°C, or 350°F. To make removal easier, line your loaf pan with parchment paper or grease and flour it.
Get the wet ingredients ready. Lightly beat the softened butter and sugar in a large bowl with an electric mixer until frothy and light. By adding air to the batter at this phase, the finished product will be lighter and more airy.
Add the eggs one at a time, beating until each is well mixed in before adding the next.
Using a fork or potato masher, mash the bananas until they are smooth. Using a rubber spatula, thoroughly incorporate the mashed bananas, vanilla extract, and undrained crushed pineapple into the wet ingredients.
Combine the dry ingredients (flour, baking soda, baking powder, and salt) in a different medium-sized basin.
Mixing until just incorporated, gradually add the dry ingredients to the wet components. Avoid overmixing as this may result in a thick and tough bread.
(Optional) Stir in the chopped nuts and shredded coconut. Using a rubber spatula, carefully fold them, if using, into the batter to prevent overmixing.
Fill the loaf pan with the batter. To get rid of any air bubbles, lightly tap the pan on the counter.
Bake for 55 to 60 minutes, or until an inserted toothpick comes out clean. The bread should have a golden brown top.
Give the bread ten minutes or so to cool in the pan. Before slicing and serving, move it to a wire rack to cool fully.