Compilation Failed

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: and the language reference:

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.