Skip to content

Restructure the Solution for 'Army of Functions' task and Fix Typos#2081

Merged
iliakan merged 2 commits into
javascript-tutorial:masterfrom
MuhammedZakir:master
Sep 10, 2020
Merged

Restructure the Solution for 'Army of Functions' task and Fix Typos#2081
iliakan merged 2 commits into
javascript-tutorial:masterfrom
MuhammedZakir:master

Conversation

@MuhammedZakir

@MuhammedZakir MuhammedZakir commented Aug 25, 2020

Copy link
Copy Markdown
Contributor

Fix #2068 - Army of Functions
Fix #2070 - Typo
Fix #2056 - Grammatical Error
Fix #2074 - Remove semi-colon after function declaration

@CLAassistant

CLAassistant commented Aug 25, 2020

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@iliakan

iliakan commented Aug 27, 2020

Copy link
Copy Markdown
Member

Anything wrong with the SVG?

@MuhammedZakir

MuhammedZakir commented Sep 1, 2020

Copy link
Copy Markdown
Contributor Author

Encountered some problem on my end. Everything fixed now!

Anything wrong with the SVG?

I fixed it by replacing the SVG with a new one!

@MuhammedZakir MuhammedZakir marked this pull request as draft September 1, 2020 10:23
@MuhammedZakir MuhammedZakir marked this pull request as ready for review September 1, 2020 11:51
@MuhammedZakir MuhammedZakir force-pushed the master branch 3 times, most recently from 07a22fc to 89e3c77 Compare September 2, 2020 06:16

@iliakan iliakan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  1. Please see the comments.
  2. Split PR please. One PR covers a lot. This way I can accept it partially.

Comment thread 1-js/06-advanced-functions/03-closure/10-make-army/solution.md Outdated
Comment thread 1-js/06-advanced-functions/03-closure/10-make-army/solution.md

```js run demo
function makeArmy() {
As you can see above, on each iteration of a `while {...} ` block, a new lexical environment is created. This implies that as long as we store the value of `i` in a variable in the `while {...}` block, created Lexical Environment will have that variable with value of `i`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The second phrase is hard to understand.

@MuhammedZakir MuhammedZakir Sep 4, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

created Lexical Environment will have that variable with value of i.

^This?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This implies that as long as we store the value of i in a variable in the while {...} block, created Lexical Environment will have that variable with value of i.

@MuhammedZakir MuhammedZakir Sep 10, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does the entire sentence not making any sense or is it the way it is phrased? Do you have any idea how to simplify it? I couldn't think of anything atm. :-(

P.S. I think people can grasp the meaning if it is read along with the snippet below.

@iliakan

iliakan commented Sep 3, 2020

Copy link
Copy Markdown
Member

Please make different PRs. This one is quite big for review, I keep postponing it.

Fix javascript-tutorial#2068 - Army of Functions
Fix javascript-tutorial#2070 - Typo
Fix javascript-tutorial#2056 - Grammatical Error
Fix javascript-tutorial#2074 - Remove semi-colon after function declaration
@MuhammedZakir

Copy link
Copy Markdown
Contributor Author

Please make different PRs. This one is quite big for review, I keep postponing it.

I have removed them.

Comment thread 1-js/06-advanced-functions/03-closure/10-make-army/solution.md Outdated
Comment thread 1-js/06-advanced-functions/03-closure/10-make-army/solution.md
@iliakan

iliakan commented Sep 10, 2020

Copy link
Copy Markdown
Member

Could you make the requested minor changes please?

@MuhammedZakir

Copy link
Copy Markdown
Contributor Author

Could you make the requested minor changes please?

Done.

@iliakan

iliakan commented Sep 10, 2020

Copy link
Copy Markdown
Member

I'll merge it and review the part about the task.

PLEASE make separate PRs for different articles =) instead of 1 huge PR (multiple branches help).

@iliakan

iliakan commented Sep 10, 2020

Copy link
Copy Markdown
Member

Thanks!

@iliakan iliakan merged commit 0168147 into javascript-tutorial:master Sep 10, 2020
@iliakan

iliakan commented Sep 10, 2020

Copy link
Copy Markdown
Member

@MuhammedZakir I thoroughly re-examined and further updated http://javascript.info/task/make-army, basing on your suggested changes, hope it's even better now.

@MuhammedZakir

MuhammedZakir commented Sep 10, 2020

Copy link
Copy Markdown
Contributor Author

PLEASE make separate PRs for different articles =) instead of 1 huge PR (multiple branches help).

Sorry about that! It won't happen again! :-)

@MuhammedZakir I thoroughly re-examined and further updated http://javascript.info/task/make-army, basing on your suggested changes, hope it's even better now.

Looks good! 👍 I found some grammar mistakes. As I am a bit busy now, I will make a PR later.

Thanks!

You are welcome! :-)

Edit: Website is not updated. Are you perhaps updating it manually and not automatically on each new commit?

MuhammedZakir added a commit to MuhammedZakir/en.javascript.info that referenced this pull request Sep 18, 2020
MuhammedZakir added a commit to MuhammedZakir/en.javascript.info that referenced this pull request Sep 18, 2020
Fix grammar and indent some paragraphs.
Complements javascript-tutorial#2081.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants