Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

NW6 | Fikret Ellek | JS-2-Module | Week-1 #183

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

Conversation

fikretellek
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

Week 1's work is done.

Questions

Ask any questions you have for your reviewer.

Copy link

netlify bot commented Jan 13, 2024

Deploy Preview for cute-gaufre-e4b4e5 ready!

Name Link
🔨 Latest commit 677c21d
🔍 Latest deploy log https://app.netlify.com/sites/cute-gaufre-e4b4e5/deploys/65a2a7b197a6960008539fb1
😎 Deploy Preview https://deploy-preview-183--cute-gaufre-e4b4e5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@AltomHussain AltomHussain left a comment

Choose a reason for hiding this comment

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

Great work @fikretellek !
Have a look at the feedback I left for your and try to implement them here and use it in your next tasks.

Thanks

} else {
median = (sortedList[middleIndex] + sortedList[middleIndex - 1]) / 2;
}

return median;

Choose a reason for hiding this comment

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

Nice work!

return list;
} else {
let dedupedList = [];
for (let x of list) {

Choose a reason for hiding this comment

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

Can you please rename the x variable with a meaningful name?

function maxNum(list) {
let maximum = -Infinity;
for (let x of list) {
if (x > maximum && !x.isNaN) {

Choose a reason for hiding this comment

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

Also, x is not really useful you should make all your functions and variables more meaningful.

if (list.length === 0) {
return 0;
} else {
let sumOfNum = 0;

Choose a reason for hiding this comment

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

Is good practice to declare your variables at the top at the beginning of the function. SO can you remove the sumOfNum var to line 2?

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.

3 participants