🎲
Random Pick
base.randomBase SetUtilityReaches into a bag and pulls out one random item. Great for random jokes, quotes, prizes, challenge assignments, or anything where variety is the spice of life.
When to use this
- →Separate items with commas, or put each on a new line
- →The result becomes a ✨ Spark you can drop anywhere in the flow
On the canvas
This is what Random Pick looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🎲Utility
Random Pick
base.randomitemsrequired
apple, banana, cherry
or one per line
asrequired
picked (becomes a Spark!)
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
itemsapple, banana, cherry
or one per line | textarea | yes | Items to pick from 🎩 |
aspicked (becomes a Spark!) | text | yes | Name the result ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{pick}}stringRandomly picked valueOutput ports
outputMoves on with the random pick available as a Spark
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const items = ["apple", "banana", "cherry"];
const picked = items[Math.floor(Math.random() * items.length)];
// {{pick}}More Utility pieces