Glasgow | ITP-Jan-26 | Alasdair MacDonald | Sprint 3 | Coursework 3 implement and rewrite#1157
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
This exercise has a second part "2 Rewrite tests with Jest" ==> three more files to be updated.
| const numberValue = Number(rank); | ||
|
|
||
| if (numberValue >= 2 && numberValue <= 10) { | ||
| return numberValue; | ||
| } |
There was a problem hiding this comment.
In JavaScript, strings that represent valid numeric literals in the language can be safely converted to equivalent numbers. For examples, "0x02", "2.1", or "0002".
Does your function return the value you expected from each of the following function calls?
getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("0002♠");
You also need to update the |
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
You need to revert the change made to package.json in the top-level folder (or else the validation bot will keep complaining).
One way to revert changes to a file is via the git restore command.
First, locate a commit before the file was modified. It could be the first commit you made, assuming the branch started in a clean state.
Next, record the first 7 characters of the commit SHA.
Suppose the file is path/to/file, and you want to restore the file to its state before the commit with SHA 1234567.
The command is:
git restore --source=1234567^ path/to/file
After the file is restored, make a commit and push the changes to GitHub.
| } catch (e) {} | ||
|
|
||
| // What other invalid card cases can you think of? | ||
| >>>>>>> 983743526bc0a40a31b8e20926f23fa3ceb5cf29 |
There was a problem hiding this comment.
Lines 32, 34, 85 are merge conflict markers.
Lines 33 is from one source and lines 35 to 84 are from another source. You need to
- Decide which lines of code you want to keep.
- Delete the markers (on the lines I mentioned).
Learners, PR Template
Self checklist
Changelist
Completed the tasks required on the sprint, completed in one sitting due to catching up on course.
Questions
N/A