Arduino cant give power to an LED

CrossRoads:
Please post your schematic/wiring as well.

You're missing this statement for the fan pin:

pinMode(ledPin,OUTPUT);

Am surprised it ever turned on; writing the pin hi/lo here

    digitalWrite(fan,HIGH);

delay(500);
    digitalWrite(fan,LOW);



only enables/disables the internal pullup resistor.

I don't see anything that talks about a buzzer.

With today's more efficient LEDs even the small amount of current that the input pin internal pull-up resistor can provide will be seen in most leds as he enables and disables the pull-up in the sketch. Try it sometime.