Scale down logic

When you scale down using something like

docker service scale myService=3
docker service scale myService=1

how does docker determine which tasks to stop?

For example, is it oldest first?