I'm trying to insert this ascii img:
:hNMMh.
.sosooNm`
+sosysyds
s+o/oossy:
`.` -+shho++soy+oo+osyoy:::...`
`o:` `+yhhhoyhhyds/-:-os++oshhsos+/+////+/:
oyo//yyyyyyyyhhyhyyssoyymmNmyo///+oosyyyhhd-
/+shhhhhddhdmhyyyyyyyyyyyyyyysyhhhyyyyyyyyho
:o+//////+osddyyyyyyyyyyyyyyyyyyyhdhyyyyyyyyd
`:` -mhyyyyyyyyyyyyyyhhdmdddhyyyyyyhN
ydyyyyyyyyhhhhddmmmdmmddhhyyyyhdm
:dhyhyysyhyyyyhhyyhddmdhysyyhyhyd
.-:-` :dhyyyyyyhyyyhyyyyyssdhysyyddyyy
.//::///-` :dyyyyyyyyyd+://::+:+hdhhhdhyh/
:/----:::///-.` +hy+yyysssh::+::/+/sdhyyyyyyh`
-/---------::////:-.-h+://+///y+/+soooddhyyhhyyh-
o-----------------://dy+:-:+syyd/+hso+hhhhhhyso-
+::///:::::::::--::::sdhyshhyyyyh:/ssso/s++y`
```.o/://://///mhyhddhyyyhs--//://-+:
`o--:::::::ydyyymdhyyyd:-:://--o
/:--------:dyyhsydhyyhs-:/:--+`
+:-------:syyd:-odhyyd/:--:+`
`. :/:--:/::-dhhhyo+dhyhs:-//`
++:.` ....:/--odyyym::mhyhhys
///:::::::++///d//sh--ydyyyyh+
-+---------:::+s-:s-:+hhyhy/y
`//--------:::h:+o:- :sos-y
.:/-----:/+sy/s- /o-o:
------++/-:++ .s/s`
/yyo+/:- `y:o/
`` -s-:o-
s:-:+o.
.so++//
In a variable to log it in the terminal, but I can't close the " or '. any idea?
There are many ways to achieve this, but in my opinion the best one is to store this text in a file (image.txt
for example), and read it with the fs
module like this
var image = fs.readfilesync('image.txt');
console.log(image);
I'm guessing you must be doing something like this:
var test = 'khsadlkjhk
khsgfjds';
Because next lines in javascript are treated as end of statement, you cannot store the whole text above directly into a variable in node.js. You can either save the variable using multi-line strings, or Template literals.
Do it like this:
var test = `string text line 1
string text line 2`;
Notice the use of backticks (`) instead of inverted commas
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I am trying to serve static files likecss
I'm looking at possibly moving from Java servlets which interact with C++ via CORBA calls to a NodeJS backend but I've only found two incomplete projects to implement CORBA on nodejsIs there something about the NodeJS architecture that makes it incompatible...
I am trying to execute a Nodejs script for Motion