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

adding homework 3 #32

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

adding homework 3 #32

wants to merge 2 commits into from

Conversation

3William56
Copy link
Contributor

Hi Nicole, adding all files from HW3.

@Borgaard
Copy link
Owner

Borgaard commented Nov 19, 2016

Hey Peter, this pull request has some merge conflicts that prevent me from accepting it. I got your homework, though, so you're fine for now. We'll want to fix this asap, though.

You have 2 options:

    1. Before or after class on Tuesday we can resolve this together, or
    1. If you'd like to attempt fixing this on your own, I'll give you some direction:

These are the conflicting files:

Conflicting files
Maryam-Marjoori/homework_1/app.js
Maryam-Marjoori/homework_2/app.js
andres-andresjv/homework_1/arrays-exercise/app.js
dayana-Day-ana/.DS_Store
peter-3William56/homework1/.DS_Store

There's a difference between what your Github fork has remotely, and what you have locally (on your computer) with git, and the differences are specifically in those files. Github is asking you to choose what you want to keep.

To sync this, you'll need to add, commit, and pull down from the class homework repo, add, commit, then push everything back up.

  • Navigate to your jsd5- homework directory (cd directoryHere)
  • Check your remote (git remote -v) to see the nickname/variable for class repo. It's probably upstream, but that's just my guess.
  • Do a git status to see if your directory is clean. If not, add and commit what you have.
  • Once your directory is clean, git pull upstream master - this is what will sync what's on Github remotely, and on git locally.
  • Check git's status once again, and if your directory is clean, push everything back up. If not, add, commit, and push.

This should resolve the merge conflict issue. :)

@Borgaard Borgaard closed this Nov 19, 2016
@Borgaard Borgaard reopened this Nov 19, 2016


(function randomAddy() {
Copy link
Owner

Choose a reason for hiding this comment

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

Excellent use of an IIFE! :)

return(Math.ceil(Math.random()*6))
}
function random2() {
return(Math.ceil(Math.random()*6))
Copy link
Owner

Choose a reason for hiding this comment

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

You could just invoke the random1() and random2() functions you defined above on lines 20 and 26 😜

Copy link
Owner

Choose a reason for hiding this comment

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

This is another great example of why scope is so important - you have two functions with identical names in the same file, but fortunately they do the same thing. What if they did something different? When you call random2(), which function would run?

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

3 participants