Preheat your oven to 350°F (175°C) and grease a 9x5-inch loaf pan.
In a large bowl, mash the bananas with a fork or potato masher until smooth, leaving some chunks for texture.
Drain the pineapple thoroughly to remove excess moisture and set aside.
In a separate bowl, whisk together the flour, baking soda, and salt.
In another bowl, combine the mashed bananas, pineapple, brown sugar, melted butter, and vanilla extract.
Gradually add the dry ingredients to the wet ingredients, stirring until just combined. Be careful not to overmix.
If using, fold in the chopped walnuts.
Pour the batter into the prepared loaf pan and smooth the top.
Bake for 60–70 minutes or until a toothpick inserted into the center comes out clean.
Let the bread cool in the pan for about 10 minutes before transferring it to a wire rack to cool completely.
Slice and enjoy the tropical goodness!