Skip to content

Update README.md#4

Open
philipabc wants to merge 1 commit into
sictweb:masterfrom
philipabc:patch-1
Open

Update README.md#4
philipabc wants to merge 1 commit into
sictweb:masterfrom
philipabc:patch-1

Conversation

@philipabc

Copy link
Copy Markdown

No description provided.

@philipabc

Copy link
Copy Markdown
Author

function(a) does not work

@philipabc philipabc closed this Sep 16, 2019
@humphd

humphd commented Sep 16, 2019

Copy link
Copy Markdown
Contributor

Hey @philipabc, I noticed you closed this. Did you want to work on this together? Happy to review if so.

@philipabc

Copy link
Copy Markdown
Author

function(a) {
console.log(arguments.length, a, arguments[0]);
}

a("correct"); // 1, "correct", "correct"
a("also", "correct"); // 2, "also", "also"
a(); // 0, undefined, undefined

this code does not work. should it be changed to :
function a(c) {
console.log(arguments.length, a, arguments[0]);
}

a("correct"); // 1, "correct", "correct"
a("also", "correct"); // 2, "also", "also"
a(); // 0, undefined, undefined

@humphd

humphd commented Sep 16, 2019

Copy link
Copy Markdown
Contributor

Sounds like a reasonable change to me, just one thing:

console.log(arguments.length, c, arguments[0]);

That is, the second arg passed to console.log() should be the argument to the function vs. the function itself.

@humphd humphd reopened this Sep 16, 2019
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