-
-
Notifications
You must be signed in to change notification settings - Fork 275
London | 25-ITP-Sep | Payman Issa Baiglu | Sprint 1 | Coursework/sprint 1 #811
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
base: main
Are you sure you want to change the base?
Conversation
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
1 similar comment
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
| const ext = ; | ||
| const dir = filePath.slice(0, lastSlashIndex + 1); | ||
|
|
||
| const lastSlDotIndex = filePath.lastIndexOf("."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the variable name, lastSlDotIndex, what does Sl stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it comes from Slice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable names should be meaningful. What are you trying to describe as SlDot? Slice dot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it means the last slice after "."
| What effect does calling the `prompt` function have? | ||
| A pop up window with the question and a place to input answer is opening. | ||
| What is the return value of `prompt`? | ||
| The input value will be returned by prompt() and stored in the variable myName. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the user entered a value and clicked the "Cancel" button (instead of the "OK" button)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return value will be null for myName. meaning that no input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "no input"?
What would prompt() return if the user didn't enter anything (i.e., no input) and then click "OK"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return will be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null means no value entered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would prompt() return if the user didn't enter anything (i.e., no input) and then click "OK"?
Have you verified that prompt() returns null in this case? Because I got a different result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out. If cancel be clicked, the output will be null. If no value entered and OK be clicked the output will be nothing as ``.
|
Many Thanks Cjyuan for reviewing this carefully. I do appreciate it! |
|
All good. Well done. |
|
Thanks for pointing out those details and helped me learn them! |
Self checklist
in this PR: Sprint 1 Coursework completed. errors fixed and questions answered