expecting EOF, found '}'.

I have a code like that,

var speed : float = 5.0f;
var X : float;

function Start () {
	X = transform.localScale.x;
}

function Update () {
	if(Input.GetKey("W"){
		transform.position.y += speed * Time.deltaTime;
	}
	
	if(Input.GetKey("A"){
		transform.position.x -= speed * Time.deltaTime;
		transform.localScale.x = X;
	}
	
	if(Input.GetKey("D"){
		transform.position.x += speed * Time.deltaTime;
		transform.localScale.x = -X;
	}

}

When I start the game, I get

Assets/Move.js(9,29): BCE0044: expecting ), found ‘{’.
Assets/Move.js(13,29): BCE0044: expecting ), found ‘{’.
Assets/Move.js(16,9): BCE0044: expecting EOF, found ‘}’.
Errors, How I can fix it?

The brackets in your if statements aren’t balanced. They should be:

if(Input.GetKey("W"))
if(Input.GetKey("A"))
if(Input.GetKey("D"))