Skip to content

changes var to let in scope - #247

Merged
AnshulMalik merged 2 commits into
workshopper:es6from
lksei:scope_to_es6
Oct 21, 2018
Merged

changes var to let in scope#247
AnshulMalik merged 2 commits into
workshopper:es6from
lksei:scope_to_es6

Conversation

@lksei

@lksei lksei commented Oct 21, 2018

Copy link
Copy Markdown

contribution to issue #229

@lksei lksei changed the title changes var to let in scopes changes var to let in scope Oct 21, 2018
Comment thread problems/scope/problem.md Outdated

```js
var a = 4; // a is a global variable, it can be accessed by the functions below
let a = 4; // a is a global variable, it can be accessed by the functions below

@AnshulMalik AnshulMalik Oct 21, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we make it const?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Can we make it const?

yep, one moment

Comment thread problems/scope/problem.md Outdated
// defined inside foo
function bar(c) {
var b = 2; // another `b` variable is created inside bar function scope
let b = 2; // another `b` variable is created inside bar function scope

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ohh, let's fix the indentation too :)

@AnshulMalik AnshulMalik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@AnshulMalik

Copy link
Copy Markdown
Contributor

We can use template literals here

@lksei
lksei force-pushed the scope_to_es6 branch 19 times, most recently from b9fde94 to 552b9ca Compare October 21, 2018 06:33
@lksei
lksei changed the base branch from master to es6 October 21, 2018 06:47
@lksei

lksei commented Oct 21, 2018

Copy link
Copy Markdown
Author

i'm done

@lksei
lksei force-pushed the scope_to_es6 branch 3 times, most recently from 89691df to ed7ef36 Compare October 21, 2018 07:26
@lksei
lksei force-pushed the scope_to_es6 branch 3 times, most recently from 7f9ea8d to ca7252e Compare October 21, 2018 07:31
@AnshulMalik

Copy link
Copy Markdown
Contributor

Love it! Thanks @alexey-pd

@AnshulMalik
AnshulMalik merged commit 77ffba2 into workshopper:es6 Oct 21, 2018
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