DEV Community

Discussion on: How to Create Multi-Line String with Template Literals

Collapse
 
daviddalbusco profile image
David Dal Busco

Interesting. Does it work cross OS?

Let's say I implement the "ES6 console.log way - first example here above" on a Unix kernel, if I share the code with someone on a Windows kernel, it will be interpreted with "multi-lines" too (\n vs \r\n)?

Collapse
 
flrnd profile image
Florian Rand

JavaScript runs in the browser ๐Ÿ˜…

Collapse
 
daviddalbusco profile image
David Dal Busco

Hahaha it should yes ๐Ÿ˜‚

Let's say that my question applies in case I would run the code on the API side or as a local script ๐Ÿ˜‰

It's probably good, I just that I faced so often encoding errors in the past that I was curious about it

Thread Thread
 
flrnd profile image
Florian Rand

Interesting, Im going ti do some tests later at home with a Windows machine

Thread Thread
 
daviddalbusco profile image
David Dal Busco

Super cool ๐Ÿš€