-
Notifications
You must be signed in to change notification settings - Fork 69
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
Conversation
@pauly48 is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report
@@ Coverage Diff @@
## master #2205 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 171 171
Lines 2950 2950
Branches 796 796
=========================================
Hits 2950 2950 |
@@ -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] | |||
}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code requires semi-colon here.
A person can try to run the code without semi-colon but rather with just space, both VS CODE and RUNJS will throw errors.
Screenshots with errors
https://media.discordapp.net/attachments/836343487531712512/1009987825606869102/unknown.png?width=972&height=663
https://media.discordapp.net/attachments/836343487531712512/1009987913280393296/unknown.png?width=1440&height=246
Screenshots with output without errors
https://media.discordapp.net/attachments/836343487531712512/1009988225990930604/unknown.png
https://media.discordapp.net/attachments/836343487531712512/1009988226452307978/unknown.png?width=1019&height=663
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Hi Anthony,
I posted a reason for semicolon in the discord bug & feedback section with
the screenshots.
Could you review?
…On Thu, Aug 18, 2022 at 5:33 PM anthonykhoa ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In content/lessons/js2/sublesson/map_reduce_and_filter_functions.mdx
<#2205 (comment)>
:
> @@ -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]
+};
Can you remove the semicolons at the end on this line as well ass 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
—
Reply to this email directly, view it on GitHub
<#2205 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOWHKOLYTOXC3B3L3SMNBRLVZ3I57ANCNFSM5663JX3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Closes #2187
This correction removes syntax error within an array with parenthesis and also adds semi-colon between prototype function declaration and calling function statements.