es6

02. Parameter Check πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ—οΈ Implement process.argv

Work with a partner to implement the following user story:

  • As a developer, I want to use command-line arguments as input when writing Node.js applications.

Acceptance Criteria

  • It’s done when I have created a file, index.js, in the working directory.

  • It’s done when I use process.argv to assign two arguments to variables.

  • It’s done when I compare those two variables to see whether they are the same or not.

  • It’s done if the program returns true when the values are the same and false if they are not.

πŸ’‘ Hint

How many different ways can you solve this problem? Remember that there is not just one correct solution.

πŸ† BONUS

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • What is the difference between === and == when comparing two values in JavaScript?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here