请给我一些关于如何改进代码的建议?
goto(Math.random() * 600 - 300, Math.random() * 600 - 300);
let s = 0;
for (let index = 0; index < 60; index++) {
let a = Math.random();
let b = Math.random();
if (s === 0) {
colour(127, 0, 255, 1);
} else if (s === 1) {
colour(250, 156, 28, 1);
} else if (s === 2) {
colour(0, 120, 255, 1);
}
forward(Math.random() * 150);
if (a > b) {
left(90);
} else {
right(90);
}
s = (s + 1) % 3;
}