Y
Y
yabokushi2016-06-27 16:59:15
JavaScript
yabokushi, 2016-06-27 16:59:15

What is the best way to deal with a large number of variables at the beginning of a function?

function functionName() {
  var a = 0,
    b = 1,
    c = 2,
    ...
    z = 25;
}

How to deal with a large number of variables? Perhaps it is worth placing them in an object/array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2016-06-27
@yabokushi

If these are internal variables, then it is better to store them as variables. If most of them are arguments - then use dto

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question