-
-
Notifications
You must be signed in to change notification settings - Fork 195
London | May-2025 | Reza Jahanimir | Sprint-1 #489
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?
London | May-2025 | Reza Jahanimir | Sprint-1 #489
Conversation
…an we access methods
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.
Hi! You used good git commits - making small specific changes with good commit messages.
Your responses to the exercises are good, but there are a few points you should have a look at more closely - I've left some comments in the relevant files.
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.
Good solution, but can you see any places here where you could clean up the code style?
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.
This looks much neater - especially having all the logs together
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've identified correctly what each of the math operations is doing. Can you describe what the overall purpose of the line is? What will the output of num be?
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.
Great explanation
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 are correct that .slice()
is a string method. With that in mind, what changes could you make to this code to fix the problem?
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.
This works in this case. Would this still work if the number was being passed as a parameter?
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.
Why are you talking about "Go" variable naming rules here?
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.
a) You have found 2 function calls correctly, can you see any others?
b) You have found a fix for the problem - can you explain why the original line would not work?
c) good answer
d) Correct, the first 2 lines are declarations. Are those the only declarations in this code?
e) Good explanation of what the functions do. can you explain why we want to convert it into an integer?
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.
Very good answers
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.
Good answers for most of these.
e) The result will be a formatted string, but the question is asking if there might be a better name for it than simply "result" - can you think of 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.
Good suggestions
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.
- Did you also try the
alert
function? - Are there any other possible values you could get from
prompt
? Think about what other interactions might the user have with the popup box.
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.
Good work investigating these functions
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.
Good work having another look at these exercises. You've figured it almost all out. I just have one question remaining for the file in Sprint-1/2-mandatory-errors/3.js
.
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.
This looks much neater - especially having all the logs together
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.
Great explanation
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.
This works in this case. Would this still work if the number was being passed as a parameter?
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.
Very good answers
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.
Good suggestions
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.
Good work investigating these functions
@Reza-Jahanimir I was thinking more of how you might handle a general case with a number you wanted to slice. Imagine if you had a function with a number parameter:
You wouldn't be able to wrap the variable declaration in quotes, so what could you do to allow for slicing? |
We use a toString() method
https://www.w3schools.com/jsref/jsref_tostring_string.asp
…On Fri, 20 Jun 2025 at 12:05, LonMcGregor ***@***.***> wrote:
*LonMcGregor* left a comment
(CodeYourFuture/Module-Structuring-and-Testing-Data#489)
<#489 (comment)>
@Reza-Jahanimir <https://github.com/Reza-Jahanimir> I was thinking more
of how you might handle a general case with a number you wanted to slice.
Imagine if you had a function with a number parameter:
function example(cardNumber){ ... }
You wouldn't be able to wrap the variable declaration in quotes, so what
could you do to allow for slicing?
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BRECIMCS4DO4SWTRTXJPBED3EPTIJAVCNFSM6AAAAAB6Z2CGDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJRGAYTAMZUGM>
.
You are receiving this because you were mentioned.Message ID:
<CodeYourFuture/Module-Structuring-and-Testing-Data/pull/489/c2991010343@
github.com>
|
@Reza-Jahanimir Yes, good answer. This PR is complete. Well done on your work for this Sprint |
Learners, PR Template
Self checklist
Changelist
I have completed the exercise I was asked for
Questions
Ask any questions you have for your reviewer.