You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the following Javascript objects, find the instructions in each file's comments and log individual values to the console using dot and bracket notation.
The following files contain code that runs in the global scope of the file on hard-coded variables. Refactor each of these files so that the code is reusable and portable using a pure function.
Pure function
A function that takes arguments as the only inputs and returns the result as its only output. Pure functions don't make any changes to variables outside of the function or store internal variables as state (aka. side-effects).
Instructions
For ONE of the .js files in this Gist, refactor the following code into a function so that it:
The VS Code Debugger can be tricky to work with until you set it up. There are a lot of options but the following code will allow you to run individual files:
Instructions
Open the Run and Debug panel in VS Code;
Create a launch.json file if one doesn't already exist;
Add a "Run Current File" configuration by adding it to your launch.json file: