How to find all objects with an tag and change an value in all of them?

I have 7 separate objects on my scene with tag “Enemy” and what i want to do now is to change value “RaceBeginner” from false to true in script called “EnemyShipAI” on every object with tag “Enemy”.

I found something like this but i have no idea how to use it to change those values:

GameObject.FindGameObjectsWithTag(“EnemyAI”).GetComponent(“EnemyShipAI”).RaceBeginnerEnemy = true;

var enemies = GameObject.FindGameObjectsWithTag(“EnemyAI”);
for (enemy in enemies) enemy.GetComponent(EnemyShipAI).RaceBeginnerEnemy = true;

It’s bad practice to use quotes with GetComponent. Also it would be easier if you follow the convention of using lowercase for variable names and uppercase for class and function names.