Conversation
| * **Question:** What is the difference between forking and cloning a repository as opposed to just cloning a repository? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Forking is a request to clone and registers under your username. |
There was a problem hiding this comment.
Not quite. Forking makes a copy of the project on your GitHub account. When you fork a repository, nothing is happening locally. When you clone a repository, you're building a connection between a folder on your local machine and what's on GitHub through a remote. When you do both, you get a copy of the project (with all the same code) on both your GitHub account and on your local machine.
| * **Question:** What does `npm init` do? How does the `-y` flag modify that command? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Created a package.json file with information about the author, repo, etc. |
There was a problem hiding this comment.
Additionally, the -y flag responds "Yes" to all questions that would've been asked by npm init. Just try npm init out on its own to see what would happen without the -y flag.
| * **Question:** What is the purpose of the `.gitignore` file? What is the significance of a "dot-file?" | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** It tells the repo what files to ignore. |
There was a problem hiding this comment.
And, a "dot-file" is a hidden file, typically one that deals with configuration.
| * **Question:** What is `module.exports` and what is its _type_ in JavaScript? What is `require` and what is its _type_ in JavaScript? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** It is a way of connecting files together. It is a function. |
There was a problem hiding this comment.
This needs more detail.
module.exportsis an object and allows us to export from one file to others.requireis a function and pulls in whatever was exported in another file. If nothing was exported, it imports an object.
| * **Question:** What are some ways you can solve this problem? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** Put it in an array {a, b} |
There was a problem hiding this comment.
The {} syntax is for objects!
| * **Question:** What is `path` and where does it come from? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** It is the path of the package location and comes from node |
There was a problem hiding this comment.
Strictly speaking, path is a package that is imported by default from Node. path has methods that will tell us interesting information like the file path.
| * **Question:** Do you need to use a `./` to require the package? Why or why not? | ||
|
|
||
| * **Your Answer:** | ||
| * **Your Answer:** No, you use require('moment') |
No description provided.