Preheat the oven to 350°F, 177°C or gas mark 4. Grease a 9x9 inch baking dish.
Whisk the butter and sugars together. Then whisk in the eggs and vanilla.
Add to the bowl of an electric mixer along with the brown sugar, eggs and vanilla.
Using a spatula or wooden spoon gently fold in the flour, baking powder, and salt. Mix until everything has been just mixed in to prevent the batter from becoming over-mixed.
Gently fold in ½ cup of the M&Ms.
Pour the batter into the greased pan and then sprinkle the remaining M&Ms on top. Bake until golden brown or for 40-45 minutes or until a toothpick inserted in the middle comes out clean.