Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WM5 | Zahra-Khademi | Module-JS1 | Week-1 #80

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Zahra-k-b
Copy link

@Zahra-k-b Zahra-k-b commented Oct 3, 2023

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

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

Copy link

@MarcusZagorski MarcusZagorski left a comment

Choose a reason for hiding this comment

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

Some excellent work Zahra, keep it up!

@@ -1,4 +1,5 @@
// trying to create an age variable and then reassign the value by 1

const age = 33;
let age = 33;
age = age + 1;

Choose a reason for hiding this comment

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

very good with this reassignment! are you aware of this shorter way to write this line?

const cityOfBirth = "Bolton";
console.log(`I was born in ${cityOfBirth}`);

Choose a reason for hiding this comment

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

well done

const last4Digits = cardNumber.slice(-4);

// The last4Digits variable should store the last 4 digits of cardNumber
// However, the code isn't working
// Make and explain a prediction about why the code won't work
// Then try updating the expression last4Digits is assigned to, in order to get the correct value

Slice() method is a part of a string, not a number. CardNumber becomes a string when enclosed in single quotations.

Choose a reason for hiding this comment

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

Brilliant explanation, but just remember .slice is not part of a string. Instead, it extracts a specified part of a string.

const twelveClockTime = "20:53";
const twentyFourhourClockTime = "08:53";

Choose a reason for hiding this comment

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

Wonderful work!

Just change twentyFourhourClockTime to twentyFourHourClockTime <-- This is known as camelCase

Choose a reason for hiding this comment

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

well done!

Copy link
Author

Choose a reason for hiding this comment

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

Thank you Marcus. Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants