Business
Jobs
  • About Us
  • Solutions
    • Candidates
      We find and qualify the candidate in 48h.
    • Assessments
      500+ technical and psychological assessments, plus anti-fraud system.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Pay in 15+ LATAM countries without setting up a local entity.
  • Pricing
  • Jobs

0

262
Views
¿Es posible desestructurar varias propiedades y declararlas como una matriz al llamar a require()?

Ahora mismo tengo el siguiente código:

 const { item1, item2 } = require('./myModule.js'); const ITEMS = [item1, item2];

Y me pregunto si es posible hacer algo como esto: (que arroja un error obviamente):

 const { [item1, item2]: ITEMS } = require('./myModule.js'); /* ITEMS can be used as an array anywhere here */
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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!