What are Strings? Coding for Kids | Kodable?

A string is just a line of letters, numbers, or symbols that we use to write messages in coding.

Imagine you have a toy keyboard, when you press keys like a, b, c, and so on, you're creating a string. It’s like writing your name or a favorite word using blocks of letters. Each letter is a little block, and together they make up the full message.

Strings in Action

When you write "Hello, world!" in coding, that whole phrase is one big string. Just like how you might stack building blocks to make a tower, each block is separate, but together they form something bigger.

You can even use numbers and symbols inside strings too! Like "I have 3 toys" or "$5 for candy!". These are still strings, because they’re just lines of characters that we read and write.

Using Strings in Coding

In coding, you often use strings to store messages or instructions. It's like labeling your toy boxes, you write the label (a string) so you know what’s inside without opening the box!

So whether you're writing a secret message or counting your favorite toys, you’re using strings all the time. No magic needed, just letters and fun!

Take the quiz →

Examples

  1. A string is like a sentence in a video game, helping the computer understand words.
  2. When you type your name into a game, it uses a string to remember it.
  3. The message 'Hello, World!' is an example of a string.

Ask a question

See also

Discussion

Recent activity