Workshop › Rhythm Lanes › Step 19 of 35
judge(text, color) sets the message. A successful press calls judge('Hit', '#fde047'), and a yellow Hit
appears.
```js
function judge(text, color) {
feedback = { text, color, time: 30 }
}
closest.hit = true
judge('Hit', '#fde047')
}
```judge puts a new message in feedback; { text, color, ... } is short for { text: text, color: color, ... }.time: 30 is how many frames it should stay (used in the next step).press calls it right after marking the note hit.// A key press hits ..., write judge, with an empty line after it.press, under closest.hit = true, write judge('Hit', '#fde047').Skills: Functions
← A message on the screen Let the message go →