Preheat oven to 170 ° Celsius.
Line a baking tray with parchment paper. Set aside.
In a medium-sized bowl, beat the butter and sugar until creamy. Suffice if it is creamy, do not overbeat.
Add the pandan essence and extract and beat again until they are well incorporated into the creamed mixture and the green color from the extract is evenly distributed.
Add the flour and mix until combined.
Add the grated coconut and mix again until well combined.
Scoop the pandan coconut cookie dough into 1 tablespoon sizes.
Shape them into round balls by hand and place them slightly apart on the prepared baking tray.
Lightly press the pandan cookie dough balls with a fork horizontally. Lift the fork and press again, this time vertically. This will make a criss-cross pattern on the cookies. Apply only light pressure when pressing with the fork to avoid your pandan cookies from becoming too thin and flat.
Sprinkle approximately ⅛ grated gula melaka on each cookie.
Bake the pandan gula melaka cookies for 15 minutes at 170°Celsius for crisp and crumbly pandan cookies. For chewy cookies, reduce the baking time to 10 minutes.
Let the cookies cool completely on a wire rack before storing them in an airtight container.