Skip to content

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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

Reza-Jahanimir
Copy link

Learners, PR Template

Self checklist

  • [x ] I have committed my files one by one, on purpose, and for a reason
  • [x ] I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • [ x] I have tested my changes
  • [x ] My changes follow the style guide
  • [x ] My changes meet the requirements of this task

Changelist

I have completed the exercise I was asked for

Questions

Ask any questions you have for your reviewer.

@Reza-Jahanimir Reza-Jahanimir added the Needs Review Participant to add when requesting review label Jun 7, 2025
@Reza-Jahanimir Reza-Jahanimir added the 📅 Sprint 1 Assigned during Sprint 1 of this module label Jun 12, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jun 19, 2025
Copy link

@LonMcGregor LonMcGregor left a 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.

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?

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

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great explanation

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?

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?

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?

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good answers

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Did you also try the alert function?
  2. Are there any other possible values you could get from prompt? Think about what other interactions might the user have with the popup box.

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

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jun 19, 2025
@Reza-Jahanimir Reza-Jahanimir added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Jun 19, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jun 20, 2025
Copy link

@LonMcGregor LonMcGregor left a 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.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great explanation

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good answers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestions

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

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jun 20, 2025
@Reza-Jahanimir Reza-Jahanimir added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Jun 20, 2025
@LonMcGregor
Copy link

@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?

@Reza-Jahanimir
Copy link
Author

Reza-Jahanimir commented Jun 22, 2025 via email

@LonMcGregor
Copy link

@Reza-Jahanimir Yes, good answer. This PR is complete. Well done on your work for this Sprint

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review Complete Volunteer to add when work is complete and review comments have been addressed and removed Needs Review Participant to add when requesting review labels Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed Reviewed Volunteer to add when completing a review 📅 Sprint 1 Assigned during Sprint 1 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants