Need help with Raycast

So I am trying to make a raycast spawn an object when it hits a target tagged with “SpawnO”… I’m not really good with scripting, I’m new but I’m watching tutorials and I try to understand them, but I don’t understand this, I get two errors:

(8,15): UCE0001: ‘;’ expected. Insert a semicolon at the end.
(7,8): UCE0001: ‘;’ expected. Insert a semicolon at the end.

fucntion Update()
    {
    	if(Input.GetButtonDown("Fire1"))
        {
        Ray ray;
        RaycastHit hit;
        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(ray, out hit, 150.0f))
        {
        if (hit.collider.name=="SpawnO")
        Instantiate(myPrefab, hit.point, Quaternion.identity);
        }
        }
    }

What did I do wrong? I have “;” in the end, did I miss something?

You’ve written fucntion Update() instead of function Update()

you are creating the variables the wrong way.

function Update()
{
	if(Input.GetButtonDown("Fire1"))
	{
	var hit : RaycastHit;
	var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
	if (Physics.Raycast(ray, hit, 150.0f))
		{
		if (hit.collider.name=="SpawnO")
		Instantiate(myPrefab, hit.point, Quaternion.identity);
        }
    }
}