list
Many values in order under one name. Places start at 0. Advanced › Arrays.
let answers = ["Yes", "No"]
Secret messages · Find each block in the MakeCode toolbox (the category is at the end of each line).
Many values in order under one name. Places start at 0. Advanced › Arrays.
let answers = ["Yes", "No"]
How many items are in the list. The last place is the length − 1. Arrays.
answers.length
The item at a place in the list, counted from 0. Arrays.
answers[0]
Send a place number; both micro:bits must hold the same list in the same order.
let words = ["Hi", "Yes", "No"]
radio.onReceivedNumber(function (receivedNumber) {
basic.showString(words[receivedNumber])
})