This variable is never used. When it is 'exported' at the bottom, you are just copying over the value (which will be undefined). That's also the only time it's ever accessed, so it would probably make more sense to just initialize mongo.init.res_id in the export with a literal.