Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 5 diagram out of order #56

Open
BattyCathy opened this issue Apr 24, 2021 · 0 comments
Open

Exercise 5 diagram out of order #56

BattyCathy opened this issue Apr 24, 2021 · 0 comments

Comments

@BattyCathy
Copy link

-In project five, the file diagram showing the user the intended result is shown as:

project-
├── dest
│ ├── index.js
│ └── util.js
├── src
│ ├── index.js
│ └── util.js
└── test
├── index.js
└── util.js

-Which would lead one to believe that the solution is:

#!usr/bin/env bash

RESULT=$(( $1 * ($2 + $3) ))

echo project-$RESULT/{dest,src,test}/{index.js,util.js}

-Unfortunately, this answer is incorrect.

-After about ten minutes of reworking my syntax, I noticed that the line showing the actual value the script should return is actually:

project-11/src/index.js project-11/src/util.js project-11/dest/index.js project-11/dest/util.js project-11/test/index.js project-11/test/util.js

-This means that the correct answer is actually:

#!usr/bin/env bash

RESULT=$(( $1 * ($2 + $3) ))

echo project-$RESULT/{src,dest,test}/{index.js,util.js}

-Unless this was an intentional exercise in attention to detail, I suggest either changing the file tree diagram to:

project-
├── src
│ ├── index.js
│ └── util.js
├── dest
│ ├── index.js
│ └── util.js
└── test
├── index.js
└── util.js

-Or the intended output to:

project-11/dest/index.js project-11/dest/util.js project-11/src/index.js project-11/src/util.js project-11/test/index.js project-11/test/util.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant