Skip to content

Instantly share code, notes, and snippets.

@funnythingz
Last active January 8, 2019 07:30
Show Gist options
  • Save funnythingz/cad2a934db1a341e840dac505b9c260e to your computer and use it in GitHub Desktop.
Save funnythingz/cad2a934db1a341e840dac505b9c260e to your computer and use it in GitHub Desktop.

練習問題

過去にやったもの

  • JSのお勉強ざっくり
  • 名刺ジェネレーター
  • かんたんなtwitterもどき

OOPでエヴァンゲリオンをつくってみよう

難易度: ☆

  • エヴァにパイロットを乗せてみろう
  • 使徒と戦わせてみよう

レンダーをつくってみよう

難易度: ☆

  • render

かんたんなレイヤードアーキテクチャなコードを書いてみよう

難易度: ☆☆

  • View
  • ViewModel
  • Model
  • Store
@funnythingz
Copy link
Author

interface IEvangelion { 
    name: String;
}

abstract class Evangelion implements IEvangelion {
    constructor(public name: String) { }
    
    sayName() {
        console.log(this.name);
    }
}

class FirstEvangelion extends Evangelion { 
    constructor(name) { 
        super(name);
    }
}

const firstEvangelion = new FirstEvangelion('エヴァ初号機');
firstEvangelion.sayName();

@funnythingz
Copy link
Author

funnythingz commented Jan 8, 2019

Render.md2html('# みだし'); // `<h1>みだし</h1>`

<h1> <h2> <h3> <h4> <h5> <h6> <p> <ul><li>

@funnythingz
Copy link
Author

ヒント

class Render {
  static md2html(string) {
    return string;
  }
}

console.log(Render.md2html('#hoge'))
$ node xxx.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment