When you output a long word, it fails. And when you perform on a short command, there is no failure.
@user79559, could you please elaborate on that a bit more? (cannot see anywhere in your code something that displays "Hi...*).
The restart may have different causes:
running out of heap space
running out of time (js work has to complete in the breaks between ESP8266 has to tend Wifi business)
running out of power (brown out... if ESP8266 is not solidly powered / has not enough decoupling capacitance across GND and VCC, or power supply is too weak - too many other things are on the 3.3V rail together with ESP8266 - ESP8266 Wifi operation takes it down...)
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.
@user79559, could you please elaborate on that a bit more? (cannot see anywhere in your code something that displays "Hi...*).
The restart may have different causes: