It seems that ECMA Script does not support timed code executions like setInterval().Is there any work around for this? I thought of using a while true loop but it does not have a facility to wait for a set time interval.
ECMAScript 262 specification has nothing about events (and timers are special kind of events). Events registration and firing infrastructure is a part of runtime that is orthogonal to the language itself.