简体   繁体   English

如何创建console.log?

[英]How to create console.log?

I want to finish my JavaScript code professionally.我想专业地完成我的 JavaScript 代码。

I want to do a console.log like a picture so... I go to https://www.text-image.com/ and convert my picture into ASCII.我想做一个像图片一样的console.log ,所以......我从go到https://www.text-image.com/并将我的图片转换为ASCII。 This is my picture in ASCII text for example...例如,这是我的 ASCII 文本图片...

  ``   ``  ``   ``  ``   ``  ``  ``   ```-/+osyhhhhhhyso+/-```   ``  ``  ``   ``  ``   ``  ``   ``  
``   ``  ``  ``   ``  ``   ``  ``  ./shmdys+//:..--..://+shdmhs/.  ``  ``   ``  ``   ``  ``  ``   ``
  ``   ``  ``   ``  ``   ``  ``./ymhs/-`  ``   ``  ``   ``  `-/sdmy/.``  ``   ``  ``   ``  ``   ``  
``   `   ``   `   ``  ``   ``+hmy/````  ``   `   ``   `   ``  ````/ymh+``   ``  ``   `   ``   `   ``
                          -ymy:``                                  ``:ymy-                          
  ``   ``  ``   ``  ``  -hmo.``   `   ``  ``   ``...`   ``  ``   `   ``.omh-  ``  ``   ``  ``   ``  
``   `   ``   `   ``  .ymo.``  ``   ``  `-/++oyhhddhhhs+++:.  ``   ``  ``.omy.  ``   `   ``   `   ``
  ``   ``  ``   ``  `/my.``  `-/:``  .+oo/-++/-..+o.-./+/-:+o+-  ``-+-`  ``.ym/`  ``   ``  ``   ``  
``   ``  ``  ``   ``sN/` ``-sdm/`  :sy-``++.``.  ++  -.``/+.`.+y+` `/dms:`. `+Ns``   ``  ``  ``   ``
  ``   ``  ``   ```hm- .yo/NNs-  /y/`.:oy+:-.-```/+```/`../yo//::so` .smN+oh- :mh```   ``  ``   ``  
``   ``  ``  ``  `hm. `dh`ho++ .y+` ``:o..`-+////sy///+y:-..++``  :y/ /+oh.ym` .mh`  ``  ``  ``   ``
  ``   ``  ``   `yN.`+-M/-sds.:d/``  :s`  `--  ``/+``  +:`  `+/  ``-ho`ods-:M:+.-Ny`   ``  ``   ``  
``   `   ``   ` /M/`ys/Mhmy:`:h-.::::h.``` /``   ++   `.y ````y:-::..oo`:ymyM+oh`/M/ `   ``   `   ``
               `mh`-M++Ny/s`.d-   `.y/:////s/::::ss:::::d////:-y.`   `y/`s/sNo/M:`hm`               
  ``   ``  ``  /M- -Mo-+ym: s+`   ``h```  ./``...+o...``y-  `` o-`   `.d`:dh+-+M: :M/  ``  ``   ``  
``   ``  ``  ``hm :.MhoNd- `m` ``  -s`  ``:- ``  /+  `` o/``  `-+  ``  y/ -hNsyM./ mh``  ``  ``   ``
  ``   ``  ``  Ny`o:yMNo/:`-h``  ``+/ ``  +-````:++:`` `s+  `` `s``  ``/s`-++NNh-s`yN  ``  ``   ``  
``   ``  ``  ``Mo yy.ms/N` :d//////ys////+yyhd. -hs. :dydy+/////h//////sy `m+oN.sh oM``  ``  ``   ``
  ``   ``  `` `Mo`/M/:/Ny``.h``  ``++.oyhdNMMy `.y+```mMMNdhyo``o``  ``+o``sM+/:N+`sM` ``  ``   ``  
``   ``  ``  ``Ny `yN:dN.- `d` ``  -ysMMMMMMMs`  y+  `dMMMMMMM/::  ``  y- -.mm-Nh` yN``  ``  ``   ``
  ``   ``  ``  hm`-.yNNs-m` /o`  ```yNMMMMMMMm```my``.MMMMMMMMho```  `-y `d:oMmh.:`mh  ``  ``   ``  
``   `   ``   `+M-+y-oN++M:``s:``.-:hMMMMMMMMMo `Md `hMMMMMMMMMh/-.```y.`-Mo/Ns-yo-M+`   ``   `   ``
               `my`hm/:-sM:` `s+:-.`mMMMMMMMMMM+-MN`sMMMMMMMMMMy`.--/s: `-My-//mh`hm`               
   `   ``  ``   /M:`sNh:oM+::``o:```MMMMMMMMMMMMdMMdMMMMMMMMMMMm ` .o-`-:/Mo:hNy`/M/   ``  ``   `   
``   ``  ``  ``  ym-.+hNmMd`d+ `/+.-MMMMMMMMMMMMMMMMMMMMMMMMMMMM``/+` /d`hMmNd+.-Ny  ``  ``  ``   ``
  ``   ``  ``   ``hd-ss+sdN:+Mo  `/yMMMMMMMMMMMMMMMMMMMMMMMMMMMM++-  +Mo-Nds+sy-mh``   ``  ``   ``  
``   ``  ``  ``   .hd-ommyo/.dM/:-`yMMMMMMMMMMMMMMMMMMMMMMMMMMMMo`-/:Nm-/oydmo-mh.   ``  ``  ``   ``
  ``   ``  ``   `` `sm/.+dNNdymN/yhhNMMMMMMMMMMMMMMMMMMMMMMMMMMmshy/NmydNNd+./ms` ``   ``  ``   ``  
``   ``  ``  ``   `` /my.`++osydd+/dNMMMMMMMMMMMMMMMMMMMMMMMMMMNm/+ddyso++..ym/ ``   ``  ``  ``   ``
  ``   ``  ``   ``  ``.sm+-ohysooooodMMMMMMMMMMMMMMMMMMMMMMMNMMdooooosyhs-oms.``  ``   ``  ``   ``  
``   `   ``   `   ``  ``-ym+.:+syssso+/oMMMMMMMMMMMMMMMMMMMM+/+osssyy+:-+my-``  ``   `   ``   `   ``
                          -sms::+ooshdmMMMMMMMMMMMMMMMMMMMMMMNdhsoo+::sms-                          
  ``   ``  ``   ``  ``   `  `+hds+/+oo+dMMMMMMMMMMMMMMMMMMMMy+oo+/+sdh+`  `   ``  ``   ``  ``   ``  
``   ``  ``  ``   ``  ``   ``  ./ymho/.mMMMMMMMMMMMMMMMMMMMMy./ohmy/.  ``   ``  ``   ``  ``  ``   ``
  ``   ``  ``   ``  ``   ``  ``  ``-/shNMMMMMMMMMMMMMMMMMMMMNhs/-``  ``  ``   ``  ``   ``  ``   ``  
``   ``  ``  ``   ``  ``   ``  ``   ``  .:/+osyyhhhhyyso+/:.  ``   ``  ``   ``  `` 

``  ``  ``   ``

And now I need to get this into a my html code for example this is my code:现在我需要将它放入我的 html 代码中,例如这是我的代码:

<html>
    <script>
       console.log("A ANONYMOUS IMAGE FOR EXAMPLE");
    </script>       
</html>

I saw a console.log image on website quizlet.com and I want to do it either.我在网站 quizlet.com 上看到了一个 console.log 图像,我也想这样做。 I see a / and n scripts and I don't know what is it.我看到一个/n脚本,但我不知道它是什么。

While subjectively I feel that what you're trying to do is counter to your goals, your Javascript is accurate.虽然主观上我觉得你想做的事情与你的目标背道而驰,但你的 Javascript 是准确的。

console.log('Your art goes here.')

...is all you need. ...是你所需要的全部。 Just paste there.就贴在那里。 If you want it to look the same on larger consoles, you may need to force new lines.如果您希望它在较大的控制台上看起来相同,则可能需要强制换行。 Here's a similar question that handles new lines in console log:这是处理控制台日志中的新行的类似问题:

how to create line breaks in console.log() in node 如何在节点的 console.log() 中创建换行符

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM