Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Feature/week 1 exercises #199

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

Conversation

SyedArslanHaider
Copy link

Learnings

  1. I understand how to change a string from lower case to uppercase using this function toUpperCase()
  2. Also learn use of slice() function
  3. I understand Math.floor() function and Math.round() function
  4. also charAt() method for string
  5. How to use prompt and alert on the console

hi ,
I hope this message finds you well. I have completed the JavaScript problems for my first week and have submitted my pull request for your review.
If you have the time, I would greatly appreciate any feedback or suggestions you may have. Your insights would be invaluable as I continue to improve my skills.
Thank you very much for your support!

Copy link

@nsi88 nsi88 left a comment

Choose a reason for hiding this comment

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

Looks good. Feels that it's too easy for you)
Do you have any particular questions in there maybe?

console.log(`The base part of ${filePath} is ${base}`);
const dir = filePath.slice(0, lastSlashIndex);
const lastDotIndex = filePath.lastIndexOf(".");
const ext = filePath.slice(lastDotIndex + 1);
Copy link

Choose a reason for hiding this comment

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

Just to give you an alternative. Could be:
filePath.split('.')[1]

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

Successfully merging this pull request may close these issues.

2 participants