Take a look at this GitHub repository for the AHT10 written in C++ which might be a nice starting point for writing you javascript code to get temperature and humidity.
Give it a try and share what you achieved or where you stuck.
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.
Take a look at this GitHub repository for the AHT10 written in C++ which might be a nice starting point for writing you javascript code to get temperature and humidity.
Give it a try and share what you achieved or where you stuck.