| Level Navigation: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Current Level: 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
Wire up the button click event.
Use onEvent("buttonId","click", function() { ... }) to wire the button. Inside, log "clicked" to the Console.
Wiring up button clicks? You’ll need to use the onEvent function to listen for button clicks. Check out the Event Handling section in SNIPPETS.md for the exact syntax.
Working with button events? Check out Week 5, Lesson 2: Buttons and Events for a complete guide to event handling and the onEvent function.
onEvent callonEvent function is properly definedNext: Level 11 - Input Value Reading
| Level Navigation: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Current Level: 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |