LoginSignup
6
6

More than 5 years have passed since last update.

iojsでクラス記法を使う

Posted at

~/projでgit clone して $HOME/proj/io.js/out/Release にパスさした。

iojs --harmony_arrow_functions --harmony_classes foo.js
'use strict';

class A {}
class X extends (class extends A{}){
    sayHello(){
        console.log('hello');
    }
}
let createX = () => new X();
const x = createX();

x.sayHello();

'use strict' が必要

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6