LONDON | MAY2025 | JESUS DEL MORAL | STRUCTURING TESTING DATA/ SPRING 1#484
LONDON | MAY2025 | JESUS DEL MORAL | STRUCTURING TESTING DATA/ SPRING 1#484delmorallopez wants to merge 7 commits intoCodeYourFuture:mainfrom
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Good explanation answers in the later questions. There are some points where I've left some suggestions for you to think about.
There was a problem hiding this comment.
Can you describe more clearly what the = operator is doing?
There was a problem hiding this comment.
// “Store the value on the right-hand side into the variable on the left-hand side.”
// "Take the current value of count, add 1, and then store the result back in count."
| const base = filePath.slice(lastSlashIndex + 1); | ||
| console.log(`The base part of ${filePath} is ${base}`); | ||
|
|
||
|
|
There was a problem hiding this comment.
Good solution. Did you mean to commit an extra empty line on line 17?
There was a problem hiding this comment.
Yes It was an empty line 17
There was a problem hiding this comment.
Can you explain the difference between const and let?
There was a problem hiding this comment.
// const = A constant reference to a value, Cannot be reassigned to a new value. Good for values that should not change (like configuration, functions, etc.)
// let = A block-scoped variable that can be reassigned. Useful when the value is expected to change.
There was a problem hiding this comment.
a) Good answer
b) Can you explain why ("," "") is not allowed as parameters to a function?
c) d) Good
e) Can you explain why we need to remove the commas?
There was a problem hiding this comment.
b) Line 5: If you want to pass those values as arguments to a function like replaceAll,
//it must include the function name:
e) // The function replaceAll will find the caracter "," and will replace all of them with ""
// We don't need to remove the commas
There was a problem hiding this comment.
Did you try testing the alert function?
There was a problem hiding this comment.
I did it, we get a popup windws with the message
There was a problem hiding this comment.
At the second step you may have had a typo. Could you try again, to see what output you get?
There was a problem hiding this comment.
Objects
In this activity, we'll explore some additional concepts that you'll encounter in more depth later on in the course.
Open the Chrome devtools Console, type in console.log and then hit enter
What output do you get?
ƒ log() { [native code] }
Now enter just console in the Console, what output do you get back?
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
Try also entering typeof console
Object
Answer the following questions:
What does console store?
Error, message, information
What does the syntax console.log or console.assert mean? In particular, what does the . mean?
console is an object
.log, .assert, .error, etc. are methods (functions) attached to it
The . lets you access those methods from the object
|
OK. thanks for answering my follow up questions. I think this PR is complete now. Well done on completing this sprint. |
Learners, PR Template
Self checklist
Fork to your GitHub account.
Make a branch called coursework/sprint-1.
Make regular small commits in this branch with clear messages.
Open a PR to the CYF repo, following the instructions in the PR template.
Changelist
Exercises Module Structuring and testing data Spring 1
Questions
Ask any questions you have for your reviewer.