getify / You-Dont-Know-JS

A book series on JavaScript. @YDKJS on twitter.
Other
179.26k stars 33.48k forks source link

Update ch4.md #1794

Closed iwestlin closed 2 years ago

iwestlin commented 2 years ago

val = yield *foo( val - 1 ); should be return yield *foo( val - 1 );

Yes, I promise I've read the Contributions Guidelines (please feel free to remove this line).

Specifically quoting these guidelines regarding typos:

Typos?

Please don't worry about minor text typos. These will almost certainly be caught during the editing process.

If you're going to submit a PR for typo fixes, please be measured in doing so by collecting several small changes into a single PR (in separate commits). Or, just don't even worry about them for now, because we'll get to them later. I promise.


Please type "I already searched for this issue":

Edition: (pull requests not accepted for previous editions)

Book Title:

Chapter:

Section Title:

Topic:

iwestlin commented 2 years ago

I am not accepting any contributions for 1st edition books.

I'm aware of this, but what about errata? Should I create a issue instead?

getify commented 2 years ago

The proposed change is incorrect.

iwestlin commented 2 years ago

@getify Are you sure about that? Have you run the code? Because I did...

截屏2022-05-20 下午2 23 32 截屏2022-05-20 下午2 25 09

Please kindly correct me if I was wrong or missing something...😅

iwestlin commented 2 years ago

Oh I think I get it now, the code actually want the result of request(...) and pass it to another request's ?v=${val}

I thought it just want to reduce 3 to 1 and then do the request...

Sorry for the misunderstanding, I'll close the PR right now...😢