The code below should get you started, you need to set the raw timings in the times array, this is the time in milliseconds the IR led will pulse on and off for. The timings can be worked out from the hex codes or try this website to find your device http://irdb.tk/
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
This something I have done recently, check out the thread
http://forum.espruino.com/conversations/297428/#comment13372893
The code below should get you started, you need to set the raw timings in the times array, this is the time in milliseconds the IR led will pulse on and off for. The timings can be worked out from the hex codes or try this website to find your device http://irdb.tk/
Also if you want to convert hex to raw times this thread helped me http://www.remotecentral.com/cgi-bin/mboard/everything_else/thread.cgi?325
Also note that the in built IR doesn't have much range, maybe 50cm at most.