destroy delete the component, not the game object

in my memory game i have in function Update () this script, but this delete only the script-component "RotateByClick" and not the GameObject as i wish

var twoCards = FindObjectsOfType(RotateByClick);
 for (var areCards : RotateByClick in twoCards) {
  if(areCards.isRotated == true){
  Destroy (areCards);  //delete here the two cards
  }
 }

Try get a reference to the gameobject and delete that.

This might work, haven't tested.

var twoCards = FindObjectsOfType(RotateByClick);
 for (var areCards : RotateByClick in twoCards) {
  if(areCards.isRotated == true){
  Destroy (areCards.gameObject);
  }
 }