Preheat the oven to 350°F (175°C). In a bowl, place together the softened butter, brown sugar, and white sugar until smooth.
Beat until fully incorporated. Add vanilla extract and the egg to the creamed mixture, beat again.
In a separate bowl, mix the dry ingredients: flour, baking soda, and salt. Gradually add them to the wet mixture, beating until combined. Stir in the chocolate chips and most of the M&M’s, reserving some for topping.
Spread the dough evenly into a 8x6-inch (or 9*7) baking pan. Sprinkle the reserved M&M’s on top.
Bake in the preheated oven for 18–20 minutes, or until the surface is golden brown.
Allow the cookie bars to cool in the pan before slicing into squares