Stop Combining Strings The Old Way

preview_player
Показать описание


🌎 Find Me Here:

#Shorts
Рекомендации по теме
Комментарии
Автор

Yah, string template literals are the best. Also, shout-out to Console.Table - it's not nearly used enough and it makes life so much more easier for debug.

karlstenator
Автор

My professor just did this yesterday and glossed over how it worked. Kyle, you're not only a lifesaver, but a timely one 🙏🙏

matthewhawkins
Автор

I smile everytime I use this instead of old ugly way

mohammadnayef
Автор

Brilliant video! Concise and a thorough explanation.

alleycaaat
Автор

Awesome stuff Kyle..Well explained under a minute...Love the short videos

abhilashd
Автор

Template literals have got to be my favorite ES6 feature. Not only do you not need to fret about spaces and plus signs, but they allow you to use either single or double quotes in the same string at the same time, and format your string into multiple lines exactly how they appear in your code!

stevenedwards
Автор

custom`My name is ${name} and I love ${hobby}` <- this has *two* strings: "My name is " and " and I love ". Why does it add a *third* empty string at the end?

DanThemes
Автор

Finally, a tip that I already know! I was getting worried 😆

farzadmf
Автор

Can I just say, I love your voice man? It’s soothing and actually helps make learning from you easier and more straight-forward for some reason.

aalvarez
Автор

Eslinter does the conversion automatically :)

irinagr
Автор

From the creators of "John undefined" and "undefined Doe" 😅

exsesx
Автор

Very PHPy. Which makes it superior. Well done Javacript. And Kyle for pointing this out.

breebw
Автор

Am I the only one who clicked this for code then stayed because he is handsome?

bdfb-thek
Автор

I always avoid string literals for concatenating string when they're stored in variables. If one of the variable is undefined or null, it'd print that - or when its empty, it'll leave a blank space. I'd rather use classnames for constructing class string or array such as `[var1, var2].filter(Boolean).join(' ');`

choz
Автор

Don't use back ticks if don't intent to use variables inside them.

sostrcan
Автор

Wow, like this hasn't been out for years now

kalempster
Автор

Using tbis if variable is undefined then it is showing undefine with string

PawanKumar-gxik
Автор

I would consider this the old way, it's too well known.

mikopiko
Автор

The thing is you don't need spaces.

MorgurEdits
Автор

Great Stuff! Could You Please Do A Video on Making a HTML Announcement Banner? I really need it! Your videos are pretty good!

akhils