With the arrival of Template Literals, it's finally super easy to produce multi-line strings. Previously, we had to use the \n or separate string...
For further actions, you may consider blocking this person and/or reporting abuse
Another good addition to template literals is writing more readable code, for example:
It also works
Totally! String interpolation is probably one of my most used ES6 feature ๐ฏ
Same here! Btw I forgot to mention great article! (Concentrated writing the example totally forgot about being polite ๐)
Youโre welcome! Btw, thanks for jumping back and leaving this kind comment ๐ Youโre making this community really nice to a part of ๐
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)?
JavaScript runs in the browser ๐
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
Interesting, Im going ti do some tests later at home with a Windows machine
Super cool ๐
I love template literals. I remember having to write HTML templates with the '"\n" +'-notation. So messy, so easy to make mistakes. Great article for beginners!
Same! And you pointed out the biggest benefit, it helps reduce errors. Thatโs why clean code so important, it makes it easier to spot errors. And template literals definitely accomplishes that! ๐ฏ