JavaScript Basics Part 3: Strings

0

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.

[js]
“hello world”;
‘I have 5 pears’;
[/js]

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.

[js]
“hello” + “world”;
[/js]

LEAVE A REPLY