Sounds like it's not seeing any response from the HC-SR04.
setWatch(function(e){console.log(e);},A1,{repeat:true}); //replace A1 with echo/output pin
digitalPulse(A0,1,0.01); //Replace A0 with the trigger (input) pin
If that displays nothing, it confirms that the part isn't behaving as expected.
Do you have it connected to 5v tolerant pins, and 5v power? From what I see on the web, the HC-SR04 requires 5 volts.
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.
Sounds like it's not seeing any response from the HC-SR04.
If that displays nothing, it confirms that the part isn't behaving as expected.
Do you have it connected to 5v tolerant pins, and 5v power? From what I see on the web, the HC-SR04 requires 5 volts.