Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

280
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda