[js] initialize object prior to evaluation