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

67
Views
convertir la cadena '2018' en objeto obj2018

tengo lista de

 ['2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025']

que tengo que convertir a diferentes objetos como

 obj2018 = {}, obj2019 = {}, obj2020 = {}, obj2021 = {}, obj2022 = {}, obj2023 = {}, obj2024 = {}, obj2025 = {}.

alguien me puede ayudar por favor

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede crear un objeto con las claves necesarias. Ejemplo:

 const list = ['2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025']; let result = {}; for(const item of list){ result[`obj${item}`] = {}; } console.log(result);

about 4 years ago · Juan Pablo Isaza Report
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!