My lead always asks me to get rid of the new variables as much as I can saying it costs an overhead. However, I'm not sure if that actually degrades the performance. If anything, making new variables improves the readability of my code. Does it actually worsen the performance?
Option 1:
var a = something1();
var b = something2();
var c = something3();
var d = something4(a, b, c);
option 2: Making it just one line of code.
var d = something4(something1(), something2(), something3());
Please note: at times, it gets complicated and the readability worsens.