I have a newbie question about javascript object. If nodejs/express backend is expecting an object in req.query from front end with2 predefined keys: key1 and key2. On nodejs backend, the req.query is accessed by:
let _obj = {key1:req.query.key1, key2:req.query.key2};
If req.query.key1 is undefined and req.query.key2 is value2, then my understanding is that _obj becomes:
{key2:value2}
If key1 is null and key2 is value2, then _obj becomes:
{key1:null, key2:value2}
Is the understanding above correct? Any supporting doc is appreciated.