-
-
Notifications
You must be signed in to change notification settings - Fork 301
Lon_ITP_Jan_25 | Franklin D Kamela | Module Structuring and Storing Data | Sprint_1 #261
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
Conversation
GergelyKI
left a comment
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.
It looks good, I left a few comment here and there.
| // This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. | ||
|
|
||
| let initials = ``; | ||
| let initials = `${firstName.charAt(0)+middleName.charAt(0)+lastName.charAt(0)} `; |
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.
Here, you concatenate strings values with the + operator. This result in a string already. There's no need to use the template literal: ${} .
Advanced tip:
Concatenating strings with the + operator is considered slow in general. This is what the template literals can help with. So if you do it like this, probably it could be faster:
${firstName.charAt(0)} ${middleName.charAt(0)} ${lastName.charAt(0)}
Sprint-1/1-key-exercises/4-random.js
Outdated
| // the math.random() generates a random number from 0 to 1 | ||
| // the Math.random() * (maximum - minimum + 1) scales the random number to a range of (maximum - minimum + 1) | ||
| // this helps to cover all possible values from minimum to maximum | ||
| // the Math.floor(...) rounds up the result to make sure we get an integer value |
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.
Is this rounding up for sure? Why would the name be floor?
hint: there's another function, Math.ceil(...)
Sprint-1/2-mandatory-errors/3.js
Outdated
| @@ -1,6 +1,11 @@ | |||
| const cardNumber = 4533787178994213; | |||
| const cardNumber = "4533787178994213"; | |||
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, however you have change the data type from number to string?
How could you keep it a number?
Tip: the last 4 digits mean the remainder if you divide by 10 000.
|
@GergelyKI i reviewed and addressed feedback. could you please review |
|
@halilibrahimcelik could you please review my code? |
Learners, PR Template
Self checklist
Changelist
Completed tasks for Sprint 1 of module Structuring and storing data
Questions
Ask any questions you have for your reviewer.