Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sairion/1d8fb55d6ab87d667704e24bbd2d40ec to your computer and use it in GitHub Desktop.

Select an option

Save sairion/1d8fb55d6ab87d667704e24bbd2d40ec to your computer and use it in GitHub Desktop.

Revisions

  1. Jaeho Lee renamed this gist Feb 12, 2017. 1 changed file with 0 additions and 0 deletions.
  2. Jaeho Lee created this gist Feb 12, 2017.
    9 changes: 9 additions & 0 deletions Interesting ECMAScript 2015+ language features
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    1. You can override constructor output by returning object type.
    ```js
    class A {
    constructor(){
    return new Number(0)
    }
    }
    console.log(new A == 0) // => true
    ```