โ† Home BP ยท 7-9 ๐ŸŒธ

Petal Parade

81
Day 1 ๐Ÿ”ฅ
๐ŸŽฏ Today's Missions
๐ŸŒธ ๐Ÿฎ ๐Ÿฆ‹ โœจ
๐ŸŒธ
Cherry Blossom Festival Universe
Petal Parade
The Sakura Festival needs its parade float TONIGHT! Six plain white buds ๐Ÿ’ฎ are riding the conveyor into the Bloom Machine. Pick ONE rule โ€” paint, grow, sparkle โ€” and the machine applies it to EVERY bud. One rule in, six blooms out: that's .map(), the transform-every-item superpower! ๐ŸŒธ

๐ŸŒธ What we're MAKING today: My Petal Parade

You know lists from Dragon Array, and in Treasure Filter you met .filter() โ€” the vault power that kept only SOME treasures and dropped the rest. .map() got a quick cameo there. Today it gets the whole show!

A map machine takes ONE rule and applies it to EVERY item in a list โ€” no skips, no drops. 6 buds go in โ†’ 6 blooms come out, all transformed the same way. And just like festival floats on a conveyor, you can chain two machines: what leaves machine 1 rolls straight into machine 2!

๐Ÿ”— Last time (Bug Detective) you hunted sneaky bugs. Before that, Treasure Filter taught you that .filter() KEEPS only some items. Today flips it around: .map() keeps EVERY item and CHANGES each one. Best friends โ€” totally different jobs! ๐ŸŒธ
parade.js JavaScript

    
๐Ÿ’ก Tap rule blocks below โ€” watch this line change LIVE! .map() changes EVERY item
festival stage LIVE
๐Ÿ’ฎ WAITING FOR RULE
๐ŸŒธ BLOOM MACHINE
Tap a rule block, then press โ–ถ Run Machine โ€” every bud rolls through!
โ†ข Buds in
6
Blooms out โ†ฃ
โ€”
๐ŸŽ–๏ธ Parade rank
Bud ๐ŸŒฑ
Challenge 1 / 5
Pink Night! Tap ONE rule block that paints every bud pinkโ€ฆ
๐Ÿงฉ Tap rule blocks for the machine MAX 2 RULES
๐ŸŒธ Rule blocks tell the machine WHAT to do. The code line updates the moment you tap!
๐Ÿ“‹ Your 5 Festival Challenges
0 of 5 challenges bloomed
๐ŸŒธ
You Mastered Petal Parade!
One rule, every bud โ€” you ran the Bloom Machine like a true festival engineer. The parade float is READY and the crowd is cheering! ๐ŸŽ๐ŸŒธ

๐Ÿ’ซ What You Learned

  • .map() takes ONE rule and applies it to EVERY item in a list โ€” no skips!
  • 6 in โ†’ 6 out: map never drops items. (.filter() keeps only SOME โ€” map keeps them ALL and changes each one)
  • You can chain machines: what leaves machine 1 rolls into machine 2 โ€” sparkle(paint(bud,'gold'))
  • Chained rules wrap each other in code โ€” the last machine picked is the outside call!
  • Real coders write buds.map(...) every day to transform whole lists โ€” now you do too! ๐ŸŒธ
๐ŸŒธ Your Creation
My Petal Parade
๐ŸŒธ Come Back Tomorrow!
Next up: Garden Sorter โ€” the festival line-up is a MESS! Learn .sort() to put every flower in perfect ORDER, smallest to tallest. The Parade Master becomes the Garden Sorter! ๐ŸŒท
๐Ÿ  Home
Nice! ๐ŸŽ‰