London | 26 ITP May | Sayeed Hussain | Sprint 1 | Coursework#1368
London | 26 ITP May | Sayeed Hussain | Sprint 1 | Coursework#1368sayeedhussain01 wants to merge 14 commits into
Conversation
|
Regarding your PR description, could you update the checkboxes to make them look like
instead of like
Relevant resource: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-tasklists |
| // Line 1 is a variable declaration, creating the count variable with an initial value of 0 | ||
| // Describe what line 3 is doing, in particular focus on what = is doing | ||
|
|
||
| // Line 3 increases the number by one and reassigns the new value to count, which stored 0 . |
There was a problem hiding this comment.
Operation like count = count + 1 is very common in programming, and there is a programming term describing such operation.
Can you find out what one-word programming term describes the operation on line 3?
| let initials = `${firstName.charAt(0)} ${middleName.charAt(0)} ${lastName.charAt(0)}`; | ||
|
|
||
| console.log(initials); |
There was a problem hiding this comment.
Currently, the value assigned to initials does not fully match the expected string, "CKJ", a string of three characters.
|
|
||
| const dir = ; | ||
| const ext = ; | ||
| const dir = filePath.slice(0, lastSlashIndex + 1); |
There was a problem hiding this comment.
Do you intend to including a trailing / in the string assigned to dir?
| // 1) Num represent a randomly generated whole number between maximum and minimum // | ||
|
|
||
| // 2) Firstly, Math.random create a random number between 0 to 1 then using a maximum and minimum,which gives us range. | ||
| // Multiplying them create a random number inside that range. Math.floor remove decimal parts and give us whole number | ||
| // finally we add minimum number ( + minimum),which start from a minimum value. Therefore num represent a whole number. |
There was a problem hiding this comment.
Phrases like "a number between X and Y" are not precise enough in a program specification, because they do not clearly state whether the endpoints X and Y are included.
Could you describe the range of the numbers each of the following expressions may produce?
Math.random()Math.random() * (maximum - minimum + 1)Math.floor(Math.random() * (maximum - minimum + 1))Math.floor(Math.random() * (maximum - minimum + 1)) + minimum
Note: One way to describe a range of numbers is to use the math's interval notation:
[,]=> inclusion(,)=> exclusion
For example, [1, 10) means, all numbers between 1 and 10, including 1 but excluding 10.
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4); | ||
| let cardNumber = 4533787178994213; | ||
| const ToString = cardNumber.toString(); |
There was a problem hiding this comment.
In JS naming convention, variable names usually begins with a lowercase letter. Names starting with an uppercase letter are used for built-in and custom data types (e.g., Math)
| const HourClockTime = "8:53pm"; | ||
| const hourClockTime = "20:53"; |
There was a problem hiding this comment.
Could you also rename these to match JS naming convention?
| // e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? | ||
|
|
||
| // 1) five function call there including log function .Lines 4 has two function and lines 5 has two function . | ||
| // 2 ) problem was line number 5 where comma was missing. |
There was a problem hiding this comment.
We can more precisely describe "A comma is missing between "," and "" in the function call" as:
A comma is missing between the ___________s.
What is the programming term that belongs in the blank?
| // b) there is zero function call . (only one is console.log but it is not part code execution) | ||
| // c)represents the number of seconds left over after converting the movie length into whole minutes. | ||
| // d) It calculates how many whole minutes are in the movie after taking away extra second that don't make full minutes. | ||
| // e) it represents time format like hours : minutes: second and I think MovieLengthDuration or short MovieDuration |
There was a problem hiding this comment.
Could consider including a "formatted" prefix in the name to suggest it stores a string.
| What is the return value of `prompt`? | ||
|
|
||
| 2. calling a prompt display a pop-up message box and ask for user input and prompt return a text entered by user as string. |
There was a problem hiding this comment.
What does prompt() return when the user entered a name and then click "Cancel" (instead of "OK")?
Learners, PR Template
Self checklist
Changelist
I have completed all coursework requirement.