51 is too busy to study this ...
Requires software
- Sublime Text
- ASCII Generator
Steps
Use the ASCII Generator generated characters to draw, copy to the JS file, directly console.info out.
Of course it can't be so smooth.
Uncaught syntaxerror:unexpected Token illegal
The reason is that the character painting contains a "carriage return line break", you must know the whole day to hit the code, you can not recognize the return to the \n line.
So many lines one by one \n is too slow, then the artifact sublime the appearance.
As you already know, you 中键 can choose multiple lines in sublime (that is, rollers):
Select multiple lines at the same time \n , then press the home key to move the cursor to the beginning of the line, delete "carriage return"!
Gaocheng, the character draw has become a line of code!
Now take it console.info out and see it!
demo:https://jsfiddle.net/gallenhu/2ntgs5wy/
This article was posted in: http://blog.hinpc.com Reprint please specify the source
Console.log print character drawing on console