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

Robby DeRouin Mod 1 Prework #204

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

Robby DeRouin Mod 1 Prework #204

wants to merge 12 commits into from

Conversation

robertjosephderouin
Copy link

Here is my Mod 1 Prework

Copy link
Contributor

@francepack francepack left a comment

Choose a reason for hiding this comment

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

Nice effort here! I highly recommend keeping up progress on the last challenges- the pseudocode and research that goes into that is great preparation for project work at Turing.

removeTopping(topping) {
for (var i = 0; i < this.toppings.length; i++){
if (this.toppings[i]==topping){
this.toppings.splice(i,1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice job iterating through your toppings to find one that matches the topping to remove!

}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice work setting this up in a function that can be run for any number of frogs! Don't forget the special circumstance for when i = 2: the language is slightly different there!

Also, I suggest putting special cases in the if/elseif block... I would put the 'default' condition in the last else block. Right now, it seems like the most hit condition is in the first block.

@@ -0,0 +1,10 @@
function checkerBoard (checkers){
for (var i = 1; i <= checkers; i++) {
if (i % 2 === 0){
Copy link
Contributor

Choose a reason for hiding this comment

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

You may need a loop within your loop if you want the ability to change the length of your rows.

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.

None yet

2 participants