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

281
Views
JS Create an object using dynamic variables (constructed strings) as variable NAMES (not keys)

Question: How can I create an (empty) object whereas the name of the object itself shall be created dynamically based on a constructed string as the object name. Is that even possible?

So far I tried to find solutions to this questions but most questions refer to how to dynamically add/change keys of an object.

What it should do is actually let `text${myVar}` = {}; where text${myVar} shall be the name of the object taking into account the variable myVar. So I actually want to solve programmatically what I would do manually in case text${myVar} would be equal to dataQ25 and creating an object with let dataQ25 = {};

Thanks a lot!

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!