Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
173
rated 0 times [  179] [ 6]  / answers: 1 / hits: 13291  / 4 Years ago, thu, october 15, 2020, 12:00:00

I'm trying to make this ASCII image shown in the console:


_______                                       
___ `'. /| .--.
' |--. || |__|
| | ' || .--.
| | | ' || __ __ | |
| | | | _ _ ||/'__ '. .:--.'. | |
| | ' .'| ' / | |:/` '. '/ | || |
| |___.' /'.' | .' | || | |`" __ | || |
/_______.'/ / | / | || / ' .'.''| ||__|
_______|/ | `'. | |/'..' / / / | |_
' .'| '/' `'-'` ._, '/
`-' `--' `--' `"

However, I'm getting multiple errors since I do not know how you would input this to make it show up in the console when I activate the code.


More From » ascii

 Answers
4

Use a template literal to embed newlines in the string. You'll need to escape the backticks that are in the string.




console.log(`_______                                       
___ `'. /| .--.
' |--. || |__|
| | ' || .--.
| | | ' || __ __ | |
| | | | _ _ ||/'__ '. .:--.'. | |
| | ' .'| ' / | |:` '. '/ | || |
| |___.' /'.' | .' | || | |` __ | || |
/_______.'/ / | / | || / ' .'.''| ||__|
_______|/ | `'. | |/'..' / / / | |_
' .'| '/' `'-'` ._, '/
`-' `--' `--' ` `);




[#2478] Monday, October 12, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
stefanicarolinat

Total Points: 145
Total Questions: 91
Total Answers: 93

Location: Cambodia
Member since Thu, Oct 7, 2021
3 Years ago
stefanicarolinat questions
Mon, Nov 15, 21, 00:00, 3 Years ago
Fri, Apr 16, 21, 00:00, 3 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
Fri, May 10, 19, 00:00, 5 Years ago
;