Iterate over a range of positions.
Create a list of positions and then continuously loop through them and set their value as the position to the Servo A.
let list = [0, 50, 100]
basic.forever(function () {
    for (let value of list) {
        sb.setServoPosition(sb.servo(SBServo.ServoA), value)
        basic.pause(1000)
    }
})If using micro:bit for the first time, follow this setup.