Javascript enable/disable camera by hotkey

if (Input.GetKey(“v”)){
if (CarCamera.enabled) = true)){
CarCamera1.enabled = false;
CarCamera.enabled = true;
print (“CAMERA1”);
}
else if (CarCamera.enabled) = false){
CarCamera1.enabled = true;
CarCamera.enabled = false;
print (“CAMERA2”);
}

what have i done wrong ? (i set the vars correctly)

Incorrect operators in your conditionals.

use ==, not =

== // is equal to
= // equals

if ( myBool == true )
{
    something = somethingElse;
}

You enabled the wrong camera in both if statements. You just reset CarCamera to what it originally was. Inside the if statements you have to change which camera is enabled.
ie the second one should say:
CarCamera1.enabled = false;
CarCamera.enabled = true;