-
-
Notifications
You must be signed in to change notification settings - Fork 195
Glasgow | ITP May -25 | Pandi Simatupang | Module-Structuring-and-Testing-Data | coursework/sprint-1 #649
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?
Glasgow | ITP May -25 | Pandi Simatupang | Module-Structuring-and-Testing-Data | coursework/sprint-1 #649
Conversation
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.
Overall you have a good understanding of how the code flows. Just fix the few comments!
const age = 33; | ||
|
||
//reassign variable age by 1 (+1) | ||
age = age + 1; |
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.
That would not work as we cannot reassign variables declared with const
. What other ways can you think of that can allows us to do what we want?
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.
You should be aware of the term Hoisting, it would allow us to access variables declared with var
before they are assigned. You can read more about it in the link. What you have done is the best approach, and var
should be used only when absolutely necessary, but it is worth knowing more about it.
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.
Looks like you still need to answer this one!
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.
Looks like you still need to answer this one!
Learners, PR Template
Self checklist
Changelist
Provided answers and comments to Sprint-1
Questions
Null