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

typo needed to compare to 'undefined' not undefined #547

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

arush
Copy link

@arush arush commented Oct 16, 2017

No description provided.

@arush
Copy link
Author

arush commented Oct 16, 2017

there's a typo in your comments. It happens to be a highly ranking page on google and i copy pasted the incorrect code only to find out it had a typo

@@ -4,7 +4,7 @@
function greetES5(message, to) {
// Test parameter values in the function body, specifying a default
to = to || 'DOM';
// OR if (typeof to === undefined) { to = 'DOM'; }
// OR if (typeof to === 'undefined') { to = 'DOM'; }

Choose a reason for hiding this comment

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

i think undefined is right, because comment says, if to is undefined then to = 'DOM'. means if to is falsy value undefined then assign 'dom' into to.

@beaufortfrancois beaufortfrancois force-pushed the gh-pages branch 7 times, most recently from c198a70 to 03c4155 Compare November 26, 2022 06:50
@beaufortfrancois beaufortfrancois force-pushed the gh-pages branch 5 times, most recently from 1de1b35 to c4f3954 Compare October 16, 2023 10:28
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