Yes using tools like babel will do the replacement. But from readability - it's much easier to assign it to a variable and continue to use that variable. Assigning it to a variable also allows for defaults if something is not set, like a port number being defaulted to 3000.
Yes using tools like babel will do the replacement. But from readability - it's much easier to assign it to a variable and continue to use that variable. Assigning it to a variable also allows for defaults if something is not set, like a port number being defaulted to 3000.
That's true if you know you're going to keep using that variable (and the code around it) in your production code.