Preheat your oven to 350°F (175°C). Grease and flour a 9x5-inch loaf pan, or line it with parchment paper leaving an overhang on the sides.
In a large bowl, whisk together the all-purpose flour, baking soda, baking powder, salt, cinnamon, and nutmeg.
In a separate medium bowl, combine the mashed bananas, grated carrots, maple syrup, oil, milk, and vanilla extract. Stir until just mixed.
Pour the wet ingredients into the bowl with the dry ingredients. Use a spatula to fold everything together until no dry flour streaks remain. Be careful not to overmix.
If using, gently fold in the chopped nuts.
Pour the batter into the prepared loaf pan and smooth the top with your spatula.
Bake for 45-55 minutes. The cake is done when a wooden skewer inserted into the center comes out clean or with a few moist crumbs.
Let the cake cool in the pan for 10 minutes. Then, use the parchment paper overhang to lift it out and place it on a wire rack to cool completely before slicing.