Birmingham | ITP-May26 | Ogbemi Mene | Sprint 1 | Coursework/sprint1#1415
Birmingham | ITP-May26 | Ogbemi Mene | Sprint 1 | Coursework/sprint1#1415meneogbemi42-bit wants to merge 21 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
Looks good. Just a two questions.
| //Line 3 is updating the value of the variable `count`. | ||
| //The `=` operator is an assignment operator, | ||
| //which means it takes the value on the right side (in this case, `count + 1`, | ||
| //which evaluates to 1) and assigns it to the variable on the left side (`count`). | ||
| //So after this line executes, the value of `count` will be updated from 0 to 1. |
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.
Could you find out what one-word programming term describes the operation on line 3?
There was a problem hiding this comment.
The one-word programming term that describes this operation is increment or incrementing)
|
|
||
| The Effect: Calling prompt opens a different type of pop-up dialog box that displays the message "What is your name?", a text input field for the user to type into, and two buttons: "OK" and "Cancel". | ||
| What is the return value of `prompt`? | ||
| The Return Value: * If you type a name (e.g., "Alex") and click OK, the function returns that exact text as a string (undefind). This string is what gets stored in your myName variable. |
There was a problem hiding this comment.
What if a user types a name and then click Cancel instead of OK?
There was a problem hiding this comment.
Even if the user types a full name into the text box, clicking Cancel overrides everything and tells the browser to discard the input. The function will completely ignore whatever text was typed and return null.
So, in your code, your variable myName would be assigned the value null.
There was a problem hiding this comment.
i did not make any change, i only gave response to the questions
|
What have you changed? You could just respond in the comment too. |
|
I did not make any change, i only gave response to the questions |
|
All good. |
Learners, PR Template
Self checklist
Changelist
Key Exercises (Sprint-1/1-key-exercises/):
Added explanations for variable counting, string initials extraction, file path manipulation, and random number generation
Includes console.log outputs and detailed comments explaining JavaScript concepts
Mandatory Error Fixes (Sprint-1/2-mandatory-errors/):
Fixed and explained const reassignment errors, temporal dead zones, method type errors, and variable naming violations
Provided corrected code examples for each error scenario
Code Interpretation (Sprint-1/3-mandatory-interpret/):
Added comprehensive answers to questions about percentage calculations, time formatting, and currency conversion
Explained expressions like replaceAll(), the modulo operator, and string manipulation methods
Exploration Exercises (Sprint-1/4-stretch-explore/):
Documented browser console functions (alert, prompt)
Explained object notation and the dot operator in JavaScript