Skip to content

Aida Zhukova | Sprint-2 - Module-Structuring-and-Testing-Data | SPRINT 2#242

Closed
aidazhukova wants to merge 11 commits intoCodeYourFuture:mainfrom
aidazhukova:coursework/sprint-2
Closed

Aida Zhukova | Sprint-2 - Module-Structuring-and-Testing-Data | SPRINT 2#242
aidazhukova wants to merge 11 commits intoCodeYourFuture:mainfrom
aidazhukova:coursework/sprint-2

Conversation

@aidazhukova
Copy link

@aidazhukova aidazhukova commented Jan 21, 2025

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 COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Homework for Sprint-2

@aidazhukova aidazhukova added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 21, 2025
// =============> write your new code here

function convertToPercentage(decimalNumber) {
const percentage = `${decimalNumber * 100}%`;
Copy link

Choose a reason for hiding this comment

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

Minor suggestion here - I don't think you need percentage variable here, you can directly return the result of your modification. It makes less code to read.

Copy link
Author

Choose a reason for hiding this comment

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

done here d37db00

// this function should square any number but instead we're going to get an error

// =============> write your prediction of the error here
// We call variable num inside the function,but it is not declared anywhere.
Copy link

Choose a reason for hiding this comment

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

If our function doesn't declare num variable, where JS will look next for num variable?

Copy link
Author

Choose a reason for hiding this comment

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

It will try to find it outside the function.

const sentence = "hello there";
function toUpperSnakeCase(inputString) {
let underScore = inputString.replaceAll(" ", "_");
console.log(underScore);
Copy link

Choose a reason for hiding this comment

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

Please, remove this console.log. I think it was there for debugging.

Copy link
Author

Choose a reason for hiding this comment

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

done 64a6cc5

const remainingSeconds = seconds % 60;
const totalMinutes = (seconds - remainingSeconds) / 60;
const remainingMinutes = totalMinutes % 60;
const remainingSeconds = seconds % 60; // 1
Copy link

Choose a reason for hiding this comment

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

What does your comment 1 mean?

Copy link
Author

Choose a reason for hiding this comment

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

removed 5d3b560

const totalMinutes = (seconds - remainingSeconds) / 60; // 1
const remainingMinutes = totalMinutes % 60; // 1
const totalHours = (totalMinutes - remainingMinutes) / 60;
console.log(totalHours);
Copy link

Choose a reason for hiding this comment

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

I think this is debugging console, please, remove it from your final work.

Copy link
Author

Choose a reason for hiding this comment

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

done aa95696

@tyzia tyzia added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 25, 2025
@tyzia
Copy link

tyzia commented Feb 13, 2025

Sorry for late response. Thank you for fixing all issues. Looks good now. Keep up good work!

@tyzia tyzia added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 13, 2025
@aidazhukova aidazhukova added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Mar 11, 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