Hi FCC,
I am having trouble understanding the challenges in this particular learning module. I actually started studying Node.js using some other resources because they explained concepts in a way I understood. After a few weeks, I decided to come back to FCC to try my hand at the NodeJS challenges. The first few were easy, having established a better understanding for how NodeJS works. However, I am once again stumped (and am frustrated enough to go back to using other resources before returning again).
To me, the directions for this challenge are not written well enough that a beginner like me knows what an environmental variable is or or even how to attach it. For example, the author writes:
The environment variables are accessible from the app as
process.env.VAR_NAME
. Theprocess.env
object is a global Node object, and variables are passed as strings.
As a beginner without any additional context I wonder does this mean the syntax is: var process.env = "VAR_NAME"
?
Then the author goes on to write:
The
.env
is a shell file, so you donât need to wrap [variable] names or values in quotes. It is also important to note that there cannot be space around the equals sign when you are assigning values to your variables, e.g.VAR_NAME=value
However, when after over a half hour of trying on my own and finally clicking the âGet Hintâ button, the syntax for part of the hint is VAR_NAME === "value"
.
Some clarity (and an editor) would be much appreciated for these challenges. I have used FCC on and off for the past year and found my interest in programming thanks to the thought out challenges of the front-end and Algorithm modules and the incredibly supportive community! Sadly, I donât feel these later certifications have been given as much attention to detail as the earlier ones. On the forum I only found ~5 responses regarding this challenge, two of which were not at all helpful.
What I would like answered are:
-
What is the standard syntax for creating a user defined environment variable (e.g. using
var
orconst
keyword, etc.)? -
After creating the variable, what is the proper way to store it to the .env object?
-
How do we call the
process.env.VAR_NAME=value
object? Must the value still be cited, or is using the name enough?
Thank you in advance.