【JavaScript】お手軽にQuineアートを作る

## ワンライナー

```javascript
s = "q = String.fromCharCode(34); s = `s = ${q}${s}${q}; eval(s)`; console.log(s)"; eval(s)
```

## 複数行

```javascript
s = `q = String.fromCharCode(96)
s = "s = " + q + s + q + ", eval(s)"
console.log(s)`, eval(s)
```

## 後は好きな形にして遊ぼう！

![zundamon_smile.gif](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/649673/c113bd7e-39d1-40e4-10a8-42fc3e3d4e43.gif)

```javascript
                                                                                     s=`p=" ".repeat(85)/*          zndmn*/
                                                                                 q=String.fromCharCode(96);s=p+"s="+q+s+q+
              ",eval(s)";                                                     console.log(s)                         /*so
    reh   aboku          nozundam                                         otin                         an oda          so
  reh abok                       unoz                                 und                   amo        ti na    no     da
sor                                  eha                             bo                 kun oz      unda   motina     no
da     sor     eha bo                  kun     ozundamotinanodasore  hab         ok     uno  zundamot                in
a nodasor     eh  ab     ok             unozund             am     otinano        dasore                           hab
o      kunozund   amot  ina       nodas ore                  ha        bok unoz                                  und
 a                              mot   ina                     n           od   asore                          habo
  ku                         noz     un                                     dam    otin                   anoda
    soreh                abok       un                                        ozu     nda           motina
         nodasore     habo         ku                            no             zu       ndamotinano
                  daso r          eha                            bo              kun       ozu
                  nd amo         tin                            anod               as        ore
                hab ok          unoz                            unda                mo        tin
               an  od         aso re                           ha  bo               ku         nozu
              nd  am         oti  na                          no    da               sor         ehab
           okun  ozu        nda   mo                         ti      na               nod         as or
          eh ab  ok        unozun da                        mo  tinanodas              ore         ha  bo
         ku  no zu        nda    moti                     nanoda       sor             eha         bok  un
        oz  un  da       mot        in                  ano             daso            re          habo  ku
       no   zu  nd       am         oti              nano                 daso          re          ha bo  ku
      noz unda  mo      ti            na          noda                       sore       ha          bo  ku  no
      zu nd am  ot     in              ano     das                               or     eh         abo   ku  no
     zunda  mo   ti    na                nod aso                                   re  ha         boku   no  zu
     ndam    ot   ina no                    da                                       sore        ha bo   ku  no
     zun      da   moti   nanodaso                                rehabokunoz         un        da  mo   ti  na
     nod      as    or ehabokunozundam                         otinanodasorehabo     kun      ozu   nd   am  ot
     in        ano   dasor        ehabo                      kun             ozun    da    mot     in    an od
      as        oreh  ab                                                           oku nozu       nd    am ot
       in       an odaso                                                          rehabok        un    oz un
        dam      ot   in  a n o                                                  das  or       eha   bokun
          oz      und am                    otinanoda                   s o r        eh    abok    unozu
                   ndamo                   t          i                            nan  odaso    reh
                    ab ok                   u         n                         ozu  ndamo ti
                     nan oda                  sorehab                        okun   oz    un
                      damot  inanoda                                     soreh    ab    ok
                        uno  zun da  motinan                      odasoreha bo   ku    no
                               zund  a  mo   tinanodasorehabokuno zu    nd am  ot in an
                                       odasor  eh              ab okunozu  ndam    ot
                                   inan   od a so              rehab    okunozunda
                                 mot     in  an od            as o re   ha      bok
                                un      oz   u n  da       mot  i  na   no         das
                               or      eh   ab  o  kunozu nd a m   ot   in           ano
                              da      so   re    h a        b o   ku    no            zun
                              da      mo   ti      nanodasoreh    ab    ok              un
                             oz       un   da     m           o   ti    na              no
                            das       or   eh      abokunozund    am    ot  i            nan
                           od        as    or     e  h     a  b   ok    un  oz            und
                         am          ot    in    anod       asor  eh    ab  ok             unoz
                       und           am    ot                     in    an  oda*/         `,eval(s)
```

https://wandbox.org/permlink/Utd09Oofo9Osiq1P

## 発展記事

https://qiita.com/mogamoga1337/items/df7d68a70214b87c5f8a

## おまけ（昔作ったやつ）

https://qiita.com/mogamoga1337/items/1ccee9afe02487ed8b05

https://qiita.com/mogamoga1337/items/afa8ebf3b130bbbcc862