Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JS-I&II Push 1#299

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kkhaag wants to merge188 commits intobloominstituteoftechnology:master
base:master
Choose a base branch
Loading
fromkkhaag:master
Open

JS-I&II Push 1#299

kkhaag wants to merge188 commits intobloominstituteoftechnology:masterfromkkhaag:master

Conversation

@kkhaag
Copy link

I'm haven't quite figured it all out yet.

Copy link

@indifferentghostindifferentghost left a comment

Choose a reason for hiding this comment

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

It's generally a good idea to remove unneeded logs likeyarn-error.log. They're very useful information for you; however, provide unneeded bloat on the repo. Just something to think about.

Great

You seem to have a good idea of callbacks and looping over arrays. Your formatting is awesome.

Requested Improvements

I think you should start breaking these functions down with pseudocode. Think through each step and if it's pseudocode you're not staring at a blank screen when writing actual code.

Questions

I unfortunately don't have a timestamp on when this was submitted, was this before our brief 1:1 on the 3/20?

Rating: {1-3}

1.5

cb(myMap);
};

constpairs=(obj)=>{

Choose a reason for hiding this comment

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

Was pairs forgotten about?

if(cb(elements[i])===true){
newFilter.push(elements[i]);
}
}returnnewFilter;

Choose a reason for hiding this comment

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

While this is fine, it's generally suggested that you separate these. It gets hard to debug if you've forgotten something small in this scenario.

}return newFilter;

src/arrays.js Outdated
if(startingValue===undefined){
startingValue=elements[0];
}
for(leti=startingValue;i<elements.length;i++){

Choose a reason for hiding this comment

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

let i = startingValue

Starting value can be anything anumber,string,object attempting to seti (theindex) to starting value is nonsensical. We went over this briefly last night wherei should be dynamic dependent on ifstartingValue is undefined.

// http://underscorejs.org/#mapObject
constmyMap={};
for(leti=0;i<obj.length;i++){
myMap.push(obj[i]);

Choose a reason for hiding this comment

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

You can't push into an object.

// Like map for arrays, but for objects. Transform the value of each property in turn.
// http://underscorejs.org/#mapObject
constmyMap={};
for(leti=0;i<obj.length;i++){

Choose a reason for hiding this comment

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

While you could add a property oflength onobjobj doesn't inherently have a length. You can access it's keys; however, to get a length.

ryan-hamblinand others added28 commitsApril 9, 2018 17:47
- Updated Readme- Updated objects.js- Updated arrays.js
- match header style for Stretch tasks from last week's curriculum.- console.logging assignment decription
- line 14 last sentence- line 22 period
- Kenna >>> Kennan
kkhaagand others added30 commitsOctober 25, 2018 16:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@indifferentghostindifferentghostindifferentghost left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@kkhaag@indifferentghost@ryan-hamblin@BigKnell@mixelpixel

[8]ページ先頭

©2009-2025 Movatter.jp