London | 25-ITP-Sep | Payman Issa Baiglu | Sprint 1 | Coursework/sprint 1#811
London | 25-ITP-Sep | Payman Issa Baiglu | Sprint 1 | Coursework/sprint 1#811PaymanIB wants to merge 10 commits intoCodeYourFuture:mainfrom
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.
In the variable name, lastSlDotIndex, what does Sl stand for?
There was a problem hiding this comment.
Variable names should be meaningful. What are you trying to describe as SlDot? Slice dot?
There was a problem hiding this comment.
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. No newline at end of file |
There was a problem hiding this comment.
What if the user entered a value and clicked the "Cancel" button (instead of the "OK" button)?
There was a problem hiding this comment.
The return value will be null for myName. meaning that no input.
There was a problem hiding this comment.
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.
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.
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