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

JS2 Part 3 syntax error corrected #2205

Merged
merged 4 commits into from
Aug 19, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,8 @@ When the function is running, `this` refers to the object that comes before `.`.
```jsx
Array.prototype.last = function () {
return this[this.length - 1]
}[(1, 2, 3)].last() // When the last function is run, 'this' refers to [1,2,3]
};
Copy link
Collaborator

@anthonykhoa anthonykhoa Aug 19, 2022

Choose a reason for hiding this comment

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

Can you remove the semicolon at the end on this line as well as line 1419? I just searched through the file, I don't see any javascript code using the semicolon, so it shouldn't be here either

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Anthony, I posted the reason for semicolon in the Discord bugs & feedback section with the screenshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@anthonykhoa anthonykhoa Aug 19, 2022

Choose a reason for hiding this comment

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

I see. Can you please put this in the PR description? And if there was any other bugs you solved with this code change, can you also include it in the PR description too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Can you please put this in the PR description? And if there was any other bugs you solved with this code change, can you also include it in the PR description too

Anthony, description has been updated as requested. Thank you :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@pauly48 approved, but I think you might have forgotten to save the updates you made to the PR description

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh i see you included the image. Please include the explanation as well

[1, 2, 3].last() // When the last function is run, 'this' refers to [1,2,3]
const jackfruit = [1, 2, 3].last() // What is jackfruit?
```

Expand All @@ -1415,7 +1416,8 @@ const jackfruit = [1, 2, 3].last() // What is jackfruit?
```jsx
Array.prototype.last = function () {
return this[this.length - 1]
}[(1, 2, 3)].last() // When the last function is run, this refers to [1,2,3]
};
[1, 2, 3].last() // When the last function is run, this refers to [1,2,3]
jackfruit = [1, 2, 3].last() // 3
```

Expand Down