Help Trying to Make the IDE Sketch Say "hi" in a loop

I am completely new to Arduino.

This is what I have so far as code.

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("hi");
delay(1000);
}

I am trying to make the IDE do a loop where it says "hi" repeatedly. I tried running the program however, the computer detected a mistake and not sure where I made the mistake. Is anyone please able to help me?????

(deleted)

Please, post the error message here.

kdx264:
I tried running the program however, the computer detected a mistake and not sure where I made the mistake.

I was able to compile your program for an Uno without any problem.

...R