Skip to content

Instantly share code, notes, and snippets.

@theharveyz
Created April 16, 2017 18:00
Show Gist options
  • Select an option

  • Save theharveyz/e8d21758d27d2ba4d2f013179a280a6f to your computer and use it in GitHub Desktop.

Select an option

Save theharveyz/e8d21758d27d2ba4d2f013179a280a6f to your computer and use it in GitHub Desktop.

Revisions

  1. theharveyz created this gist Apr 16, 2017.
    7 changes: 7 additions & 0 deletions func-method.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const func = func = (...args) => {func.info(...args)};
    func.info = (...args) => {console.info.apply(this, args)};

    // test
    func(1,2,3,4);
    // out put:
    // ø 1 2 3