Barcelona | Oct2025-2 | Roman Pavlenko | Sprint-1 | Coursework#1
Open
DraftRoman wants to merge 13 commits intomainfrom
Open
Barcelona | Oct2025-2 | Roman Pavlenko | Sprint-1 | Coursework#1DraftRoman wants to merge 13 commits intomainfrom
DraftRoman wants to merge 13 commits intomainfrom
Conversation
Explained what the line 1 and the line 7 did. Added comments, and consol.log to see the output in the terminal
Expected output: "CKJ" - used charAt method to get first character of the name - used with word as a array of símbolos
- used slice method to have a part of array - used lastIndexOf to find special symbols and grab the text before and after them
- Worked with random function and which numbers are inclusive or exclusive
How make comments - multi-line /* */ - single-line //
- declare a variables correctly, let instead of const
The error was an order error - declaration must come before usage
The error occurs because cardNumber is a number, and the slice() method is not defined for numbers. The slice() method is a string method, so to use it, we need to convert cardNumber to a string first. - to string().slice(-4) - Number to make it number again - typeof to specify the type of variable
Variable names cannot start with a number
.replaceAll(",", ""));
-added comments, answers to the questions a-e.
- got familiar with % operation - gave answers to the questions a-f
- added console.log to have a cleave view - added comments to specify each step
explore methods, property and accessors inside console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist