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

238
Views
Organizing JavaScript Variables in VsCode?

Looking for a way to organize variables inside vsCode. Similar to the way that you can collapse a function in the workspace, I would like to be able to collapse a long list of variables ...

var x = 1 
var y = 2
var z = 3
var w = 4
var v = 5
//etc.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I can think of 2 hacks:

  1. Code Block (important! be careful with variables scope)

  2. Object Literal

Example of Code Block:

{
    const x = 10;
    const y = 20;
}

Example of Object Literal:

const variablesNamespace = {
    x: 10,
    y: 10
}

console.log(variablesNamespace.x) // output 10

enter image description here

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!