web222 icon indicating copy to clipboard operation
web222 copied to clipboard

Update README.md

Open philipabc opened this issue 6 years ago • 4 comments

philipabc avatar Sep 16 '19 18:09 philipabc

function(a) does not work

philipabc avatar Sep 16 '19 18:09 philipabc

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

humphd avatar Sep 16 '19 18:09 humphd

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

philipabc avatar Sep 16 '19 18:09 philipabc

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 avatar Sep 16 '19 19:09 humphd