Compilation Failed

Hi,
I’m new to coding and am building a circuit in which when I give the arduino power, it begins to countdown from 5 minutes using a 4 digit 7 segment display. I am used to using javascript in html, so the change to an arduino is new. The sketch is a file below.
When I go to verify and save the sketch, it reads:
“‘fuction’ does not name a type”.

Can anyone provide me any help?

timer.ino (596 Bytes)

You can't write Arduino sketches in JavaScript. Please spend some time studying and experimenting with the tutorials: http://www.arduino.cc/en/Tutorial/HomePage and the language reference: http://www.arduino.cc/reference/en

Note that Arduino sketches are essentially written in C++, so you can get information from a C++ programming reference if the Arduino-specific documentation doesn't give you what you need.