Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
undefined and null value of javascript object

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!