Temporarily change ('highlight') attributes:
canvas.nodes([1, 2, 3, 4, 5]).add()
canvas.edges([[1, 2], [2, 3], [3, 4], [4, 5], [5, 1]]).add()
canvas.pause(0.5)
for (let i = 1; i < 6; i++) {
canvas.node(i).highlight().color('orange')
canvas.pause(0.5)
if (i < 6) {
canvas.edge([i, i + 1]).highlight(0).traverse('yellow')
}
}