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

Fix typos and extra code #5

Merged
merged 1 commit into from
Dec 9, 2016
Merged

Fix typos and extra code #5

merged 1 commit into from
Dec 9, 2016

Conversation

alexbaumgertner
Copy link
Contributor

Fix typos, missing/extra semicolon, duplicate css declaration.

@@ -44,7 +44,6 @@
background-position:center;
flex: 1;
justify-content: center;
align-items: center;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

duplicate of line 35

@wesbos wesbos merged commit a0451b1 into wesbos:master Dec 9, 2016
@wesbos
Copy link
Owner

wesbos commented Dec 9, 2016

Thanks! Though I do prefer the comma dangle when working with data :)

@alexbaumgertner alexbaumgertner deleted the bugfix/typos branch December 9, 2016 15:48
@alexbaumgertner
Copy link
Contributor Author

Thank you for great open source javascript course!
Hope I can contribute more :)

anoff added a commit to anoff/JavaScript30 that referenced this pull request Dec 10, 2016
jdhines added a commit to jdhines/JavaScript30 that referenced this pull request Dec 16, 2016
YuriBrunetto pushed a commit to YuriBrunetto/JavaScript30 that referenced this pull request Dec 18, 2016
Carrigan pushed a commit to Carrigan/JavaScript30 that referenced this pull request Dec 22, 2016
jdstein1 pushed a commit to jdstein1/JavaScript30 that referenced this pull request Dec 22, 2016
macuk added a commit to macuk/JavaScript30 that referenced this pull request Dec 28, 2016
razvanh pushed a commit to razvanh/JavaScript30 that referenced this pull request Dec 28, 2016
rustamyusupov added a commit to rustamyusupov/JavaScript30 that referenced this pull request Dec 29, 2016
saury pushed a commit to saury/JavaScript30 that referenced this pull request Dec 29, 2016
GPFAFF pushed a commit to GPFAFF/JavaScript30 that referenced this pull request Feb 15, 2017
kdipaolo added a commit to kdipaolo/JavaScript30 that referenced this pull request Mar 21, 2017
santospatrick pushed a commit to santospatrick/JavaScript30 that referenced this pull request Apr 23, 2017
mokahaiku pushed a commit to mokahaiku/JavaScript30 that referenced this pull request May 23, 2017
LeiG added a commit to LeiG/JavaScript30 that referenced this pull request Jun 23, 2017
ShimmiChristo added a commit to ShimmiChristo/JavaScript30 that referenced this pull request Aug 1, 2017
JeffDess added a commit to JeffDess/JavaScript30 that referenced this pull request Sep 3, 2017
austinjreilly added a commit to austinjreilly/JavaScript30 that referenced this pull request Oct 10, 2017
@DawnM DawnM mentioned this pull request Nov 2, 2017
PabloContreras added a commit to PabloContreras/JavaScript30 that referenced this pull request Feb 22, 2018
mmoroney01 added a commit to mmoroney01/JavaScript30 that referenced this pull request May 22, 2018
mancristiana added a commit to mancristiana/JavaScript30 that referenced this pull request Jun 20, 2018
smchenrybc added a commit to smchenrybc/JavaScript30 that referenced this pull request Jul 26, 2018
Watson6982 added a commit to lgss/JavaScript30 that referenced this pull request Sep 6, 2018
SAToth pushed a commit to SAToth/JavaScript30 that referenced this pull request Nov 25, 2018
fix wesbos#4: correct some inconsistencies with closing tags
ianjmacintosh added a commit to ianjmacintosh/JavaScript30 that referenced this pull request Jan 20, 2019
At first I was just going through the exercises and preparing to commit
at the very end when everything was fixed, but then I was thinking it'd
be neat to show my progress from start to finish of me coming up with a
good answer.

I started thinking of doing this (committing bad answers) on problem 4
because I tried a few approaches that demonstrated a poor understanding of
`Array.prototype.reduce()` -- specifically around the initialValue that
should be provided as its second argument. Then I got caught with a
misunderstanding around arrow functions! I expected that if my function
body were on a new line, so long as the function _itself_ were just one
line, it'd return the value and I could omit the explicit `return`
statement.

I didn't identify the turning points, but now that I write this out, I
think it'd be _really_ good for me to make a note of what happened that
made me understand better enough to fix my mistakes.

In looking back, I think the first turning point was stopping to
acknowledge I was confused and looking to the video tutorial's example
instead of continuing to "try things."

Before I "gave up" I tried simplifying my function to simply increment
a variable and return it for each iteration. When that didn't work as
expected, I consulted MDN's documentation and learned about the function
signature for `Array.prototype.reduce()` -- specfically that it took two
arguments: a callback and an "initialValue".

When I was surprised the value didn't come back as expected ("undefined"
instead of 12), I got confused and pointlessly tried to change some of
the specifics around invocation. I moved the reducer function into its
own variable. But I was just moving a bad function around, since the
issue was with the function syntax itself, specifically that it was on
two lines, which made it so it did not implicitly return a value, and I
wasn't explicitly calling the `return` statement.

So my problem didn't change at all, it just moved. And at
that point I was also working in a syntax I disliked -- having the
reducer function broken out into its own variable instead of calling it
inline. I began to resent my own code and fell into a Dostoevskian hell
of self-loathing. (Okay, maybe not, but it distracted me.)

I tried logging things in the function, and although it's tough to
identify what made me start doing it, I called `return` in the function
body and started seeing things change. Eventually I got myself back on
track.

Notes on the failed solution to exercise 5:
At this point, I've tried tackling the problem in just one line very
similarly to how I'm solving in exercise 3. This returns an array of
"[object Object]"s which is totally not what I'm going for. I think
what's happening is the type is being coerced to a string by the
backticks. I bet if I break this out into its own console log, it will
preserve the data as an object.
Nadav35 added a commit to Nadav35/JavaScript30 that referenced this pull request Feb 11, 2019
tiago-m-dias added a commit to tiago-m-dias/JavaScript30 that referenced this pull request Apr 16, 2019
n3218 added a commit to n3218/JavaScript30 that referenced this pull request Aug 5, 2019
44thm0820 added a commit to 44thm0820/JavaScript30 that referenced this pull request Dec 31, 2019
Laryl14 pushed a commit to Laryl14/JavaScript30 that referenced this pull request Feb 9, 2020
Laryl14 pushed a commit to Laryl14/JavaScript30 that referenced this pull request Feb 17, 2020
AlexJoeb pushed a commit to AlexJoeb/JavaScript30 that referenced this pull request Mar 29, 2020
sylvain-farnault added a commit to sylvain-farnault/JavaScript30 that referenced this pull request Apr 13, 2020
rachelrly added a commit to rachelrly/JavaScript30 that referenced this pull request Jul 12, 2020
Personal image gallery in JS30 wesbos#5
astroud added a commit to astroud/JavaScript30 that referenced this pull request Aug 20, 2020
LHJE referenced this pull request in LHJE/JavaScript30 Nov 28, 2020
DeonJordaan added a commit to DeonJordaan/JavaScript30 that referenced this pull request Mar 29, 2021
bhaveshgoyal182 pushed a commit to bhaveshgoyal182/JavaScript30 that referenced this pull request Jun 26, 2021
pinkx-xlink added a commit to pinkx-xlink/javascript30 that referenced this pull request Jun 29, 2023
bSkinny2 pushed a commit to bSkinny2/JavaScript30 that referenced this pull request Mar 20, 2024
ntw3001 added a commit to ntw3001/JavaScript30 that referenced this pull request Mar 21, 2024
tomech4 added a commit to tomech4/JavaScript30 that referenced this pull request Aug 2, 2024
anicodes404 pushed a commit to anicodes404/JavaScript30 that referenced this pull request Dec 18, 2024
rndall added a commit to rndall/JavaScript30 that referenced this pull request Dec 28, 2024
rndall added a commit to rndall/JavaScript30 that referenced this pull request Dec 28, 2024
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.

2 participants