JavaScript Basics Part 3: Strings

A string is anything enclosed within quote marks – it can be made up of letters, numbers, and/or symbols. Strings will work with either single or double quotes.

“hello world”;
‘I have 5 pears’;

When creating strings, there are often times when you will want to join one or more strings together. This is call concatenation, and is used by adding a “+” (plus sign) in between the strings you want to join together.

“hello” + “world”;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: