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

Start learning →

item # of (thing) in (list) — Scratch Block Guide

📌 What you will learn

Searches the list and returns the first index matching the value, or 0 if not found.

What this block does

Searches the list and returns the first index matching the value, or 0 if not found.

Look up a word’s position in a dictionary list to fetch its matching definition.

  • Category: Variables & Lists
  • Key tip: Instant built-in linear search without writing a 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 item # of (thing) in (list)
  1. When green flag clicked
  2. Say (item # of Key in bag) for 2 seconds

Try it: Shows the exact slot number of "Key" (or 0 if missing).

Related block guides

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

Back to Variables & Lists See the overview and patterns for Variables & Lists. 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 "item # of (thing) in (list)" in Scratch?

Look up a word’s position in a dictionary list to fetch its matching definition. Instant built-in linear search without writing a 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.