Learn Practice Daily golf Reference
Registers·Lesson 2 of 4·7 min·0/6 exercisesPro

Named jars and append

Jars a to z are yours: "ayy fills jar a, "ap pours it, and a capital label, "Ayy, adds to the jar instead of refilling it.

Scene

Friday, 3:40 p.m. A new salsa for the menu, the Diablo, built from lines of the other two: it takes the charred tomatoes from the Roja, the serranos from the Verde, the chiles from the Roja again. Three lines to carry at once, and jar 0 holds one.

The shelf has twenty-six more jars, and they're empty.

From memory

Warm-up from earlier chapters

Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.

Put the last thing you yanked, even after deleting since.
press the keys…3 keys
1 of 2
Put the last thing you yanked, even after deleting since.

Your own labels

Jars a to z are yours: say the label before the yank and the yank goes in that jar. "ayy puts the line in jar a, "byy another in jar b, and "ap and "bp pour them wherever you like, in any order. Only you fill them, by saying the label: deletes and other yanks leave them alone.

After"ayyj"byy
"a "4 tomatoes, charred",↵
"b "2 chiles de arbol",↵
After "ayy on the tomatoes and "byy on the chiles: two jars, two labels.
Try it

Two jars

The Diablo starts with the Roja's two lines, chiles first. Tomatoes into jar a, chiles into jar b, then at the Diablo pour "bp and "ap.

Fix the marked spots · 2 left
1export const VERDE = [
1 "6 tomatillos",
2 "2 serranos",
3 "cilantro",
4];
5export const ROJA = [
6 "4 tomatoes, charred",
7 "2 chiles de arbol",
8];
9export const DIABLO = [
+ "2 chiles de arbol",
+ "4 tomatoes, charred",
10];
NORMALLoading the editor…0.0s1:1

This exercise needs a keyboard. Read on, and play it at your computer.

Capitals add to the jar

Say the label in capitals and the yank is added to the jar instead of replacing what's in it: "Ayy puts another line after the ones already in jar a. Collect lines from three places into one jar, then pour them all with a single "ap.

After"ayyj"Ayy
"a "4 tomatoes, charred",↵ "2 chiles de arbol",↵
After "ayy and then "Ayy on the next line: one jar, two lines.
Try it

One jar, three lines

The Diablo in one pour: tomatoes into jar a ("ayy), then add the serranos and the chiles with "Ayy, then "ap once inside the Diablo.

Pro
The rest of this lesson is in Pro

The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.

See Pro

This exercise needs a keyboard. Read on, and play it at your computer.

Check yourself

Add or refill?

1salt
1lime
2end
NORMAL
Keys pressed: "ayyj"ayyj"ap

You "ayy the salt line, then "ayy (lowercase) the lime line, then "ap below end. What gets poured?

Pick an answer (or press its number), then watch the engine prove it.
Challenge

Two more salsas

The kitchen wants two more salsas from the same shelf, each in a particular order: the Fuego takes the chiles, the serranos and the tomatoes; the Mild takes the tomatillos and the cilantro. Your labels, your route. Before you start the Mild, think about what your jars still hold.

Stuck? Show a hint
Pro
The rest of this lesson is in Pro

The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.

See Pro

This exercise needs a keyboard. Read on, and play it at your computer.

From memory

Labelled jars, from memory

Press the keys.

Copy this line into jar c.
scroll here, then press the keys4 keys
1 of 4
Copy this line into jar c.