John 18:4
“Jesus therefore, knowing all things that should come upon Him, went forth, and said, Whom do you seek?”
That is, He did not wait to learn this from their coming, but spoke and acted without confusion, as knowing all these things. “But why come they with weapons, when about to seize Him?” They feared His followers, and for this reason they came upon Him late at night. “And He went forth, and said unto them, Whom do you seek?”
Source: Homilies on the Gospel of John (New Advent)