Basic data question

reduces to:

void loop() {
 if (Serial.available() > 0) {
 receivedChar = Serial.read();
 Serial.write (receivedChar);
 }
}