Also, DHT11's are terrible - the temperature is okay, the humidity is very often totally bogus. The DHT22 sucks less. Both of them will instantly fail if you connect power backwards, so don't do that.
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.
Try putting a 1k pullup to Vcc on the data line.
Also, DHT11's are terrible - the temperature is okay, the humidity is very often totally bogus. The DHT22 sucks less. Both of them will instantly fail if you connect power backwards, so don't do that.