Skip to content

LONDON_JAN25 | KHALIL ALI | STRUCTURING_AND_TESTING_DATA | SPRINT 1 | WEEK 4 #446

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

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

Conversation

khalil-ali1
Copy link

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.

@khalil-ali1 khalil-ali1 added the Needs Review Participant to add when requesting review label Apr 18, 2025
Copy link

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Some of the descriptions are not quite correct. Can you improve them?

const dir = ;
const ext = ;
const dir = filePath.slice(0, lastSlashIndex)
const ext = filePath.slice(lastSlashIndex + 5)
Copy link

Choose a reason for hiding this comment

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

Can you modify your approach for extracting the file extension so that it can work for "name" and the "extension" of any length? For example, index.html, 3-paths.js.


console.log("num value is :", num)
/*
Math.random():returns a random number between n = [ 0 , 1 [ .
Copy link

Choose a reason for hiding this comment

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

The typical interval notation to represent 0 to 1, including 0 but excluding 1 is, [0, 1).

console.log("num value is :", num)
/*
Math.random():returns a random number between n = [ 0 , 1 [ .
Math.floor() :returns the previous real number of a decimal number .
Copy link

Choose a reason for hiding this comment

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

This description does not make much sense.
For example, 3.14 is also a real number.
Can you rephrase it, or ask ChatGPT or looking the MDN reference of Math.floor()?

Comment on lines +1 to 2
const cardNumber = "4533787178994213";
const last4Digits = cardNumber.slice(-4);
Copy link

Choose a reason for hiding this comment

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

Can you use an approach that does not involve replacing the original value?

Comment on lines +1 to +3
const hourClockTime12 = "08:53";

Copy link

Choose a reason for hiding this comment

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

Why start one variable name in lowercase letter and the other one with uppercase letter?

@@ -20,3 +20,9 @@ console.log(`The percentage change is ${percentageChange}`);
// d) Identify all the lines that are variable declarations

// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?

// a) 3 times . lines (4,5,10)
Copy link

Choose a reason for hiding this comment

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

There are more than 3 function calls. Can you identify all of them?

// b) line 5 . syntax error in replaceAll function. add comma
// c) 4 , 5 lines
// d) 1 , 2 , 7 , 8 lines
// e) replace each "," in carPrice with nothing which means : delete each comma
Copy link

Choose a reason for hiding this comment

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

This only described the priceAfterOneYear.replaceAll("," ,"") part of the expression, and not the whole expression.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review labels Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants