the "in" Syntax

the title may be a bit confusing but I’ve been shooting myself in the foot trying to figure this out. im making a for loop

for(Collider hit in colliders)

and i keep getting this error

Unexpected symbol in', expecting )‘, ,', ;’, [', or =’

i know what it means but how else would i do this!?!?!?!?!?

i’ve seen others use “in” in for loops whats wrong with mine?

any help is appreciated

In C#, it should be:

  foreach (Collider hit in colliders)

In JS, it’s:

  for (var hit: Collider in colliders)