What Are Strings in JavaScript? (Examples Included)

What’s a string in JavaScript?

A string is a tricky topic if you’re new to coding. A string can actually consist of letters, symbols, and even numbers!

It might sometimes be hard to tell whether something is a string or a number but you can use the typeof operator. Calling this operator will return the actual type of the value you use it on.

Examples of strings are:

`this is a string` // using backticks
'this is also a string' // using single quotes
"this is a string as well" // using double quotes

Leave a Comment