From the course: Learning the JavaScript Language

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Strings

Strings

- [Instructor] In this video, we're going to look at strings. A string is character data. That means things like sentences, words, single letters, even numbers or punctuation. Basically, it means anything between quote marks. So for example, I could write, "this is a string". When you formulate a string like this, it's actually called a string literal. Literal here basically means you're making data of some type using the simplest notation possible. So making a string literal means I'm putting string data in quotes. There are other less convenient ways to make strings as well, but this is what we use 99% of the time. A string doesn't have to be a sentence. It can be a number inside quotes. So, if it's a string of 1, 2 instead of 12, that's a string. These are two different things as far as JavaScript is concerned. You can make strings using these double quote characters. You can also make strings using single quote…

Contents