Strings

You have been using strings. What are they?

In coding, a string is a piece of text - like a word or a sentence.

It is called a string because each letter or character follows on from the next. Imagine the letters hanging on a piece of string!

string

Usually, strings have double or single quote marks around them, like this:

"The quick brown fox"
'jumped over the lazy dog.'

Definitions

String
A sequence of characters, one after another - "The fox"
Strings can hold just one character - "£"
Strings can even be empty - "".
Character
A letter of the alphabet - a, b, c, A, B, C, …
or a digit - 0, 1, 2, …
Any other symbol on the computer - space , percent %, an emoji 🤗, …
Concatenation
Concatenation is joining strings
It is performed the + operator.
"The quick brown fox" + " " + "jumped over the lazy dog."
= "The quick brown fox jumped over the lazy dog."

In Purple Mash 2Code