GameObject translation from C# to Js?

Hello, I am trying to translate code from a tutorial from C# to Js as I was having a problem with changing a component in C#. Im getting the error saying I need a “;” at the end of line 12.

Here is the code in C#:

12. GameObject player = GameObject.FindGameObjectWithTag ("Player");
13. target = player.transform;`

Declaring the type before the variable is C#. In Javascript line 12 can be:

var player : GameObject = GameObject.FindGameObjectWithTag ("Player");

Or you can even have the type inferred:

var player = GameObject.FindGameObjectWithTag ("Player");