[js] initialize return object prior to evaluation