NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

length of (apple) — Scratch Block Guide

📌 What you will learn

Returns the total number of characters (including spaces) in a string.

What this block does

Returns the total number of characters (including spaces) in a string.

Loop through every letter of a word for typewriter dialogue or digit counters.

  • Category: Operators Blocks
  • Key tip: Pairs naturally with "letter (i) of (text)" inside a repeat loop.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using length of (apple)
  1. When green flag clicked
  2. Say (length of Scratch) for 2 seconds

Try it: Outputs 7.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Operators Blocks See the overview and patterns for Operators Blocks. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "length of (apple)" in Scratch?

Loop through every letter of a word for typewriter dialogue or digit counters. Pairs naturally with "letter (i) of (text)" inside a repeat loop.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.