Skip to content

LONDON | MAY2025 | JESUS DEL MORAL | STRUCTURING TESTING DATA/ SPRING 1#484

Closed
delmorallopez wants to merge 7 commits intoCodeYourFuture:mainfrom
delmorallopez:coursework/sprint-1
Closed

LONDON | MAY2025 | JESUS DEL MORAL | STRUCTURING TESTING DATA/ SPRING 1#484
delmorallopez wants to merge 7 commits intoCodeYourFuture:mainfrom
delmorallopez:coursework/sprint-1

Conversation

@delmorallopez
Copy link
Copy Markdown

Learners, PR Template

Self checklist

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

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.

@delmorallopez delmorallopez added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 6, 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 Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 18, 2025
Copy link
Copy Markdown

@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 explanation answers in the later questions. There are some points where I've left some suggestions for you to think about.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you describe more clearly what the = operator is doing?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

// “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."

Comment thread Sprint-1/1-key-exercises/3-paths.js Outdated
const base = filePath.slice(lastSlashIndex + 1);
console.log(`The base part of ${filePath} is ${base}`);


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good solution. Did you mean to commit an extra empty line on line 17?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes It was an empty line 17

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you explain the difference between const and let?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

// 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you try testing the alert function?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did it, we get a popup windws with the message

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At the second step you may have had a typo. Could you try again, to see what output you get?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jun 18, 2025
@delmorallopez delmorallopez added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 20, 2025
@LonMcGregor
Copy link
Copy Markdown

OK. thanks for answering my follow up questions. I think this PR is complete now. Well done on completing this sprint.

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 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 all review comments have been addressed. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants