Assets/Scripts/weaponSwitch.cs(39,1): error CS1525: Unexpected symbol `}'

So I am trying to create a simple gun switch script, following a tutorial. I’m starting out with only the glock and AK for now, but I will add more once I get the first 2 done. (I am very new to coding.) Whenever I try anything regarding it, I just create more errors. I am seeking help, if anyone can!
Here is the video:

Here is the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class weaponSwitch : MonoBehaviour {
    public GameObject Glock18;
    public GameObject AK47;
    public GameObject M4Carbine;
    public GameObject L96;
    public GameObject Shotgun;

    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {
        if (Input.GetKeyDown (KeyCode.E)) {
            RaycastHit hit;
            if (Physics.Raycast (Camera.main.transform.forward, transform.forward, out hit));
                if (hit.transform.tag == "item")
                    if(hit.transform.gameObject.name.Contains("World Model Glock-18")){
                        if(weaponOut==1){
                            changeWeapon(1);
                            if (weaponOut == 1) {
                                Destroy (hit.transform.gameObject);
                                Instantiate (Glock18, transform.root.transform.position + new Vector3 (0, 2, 0), Quaternion.identity);
                            }else if(weaponOut==2){
                                    Destroy(hit.transform.gameObject);
                                    Instantiate(AK47, transform.root.transform.position+new Vector3(0, 2, 0), Quaternion.identity);

                            }
                        }
                    }
                }
            }
        }
    }
    void changeWeapon(int weapon){
        if (weaponIn == 1) {
            weaponOut == 1;
            transform.FindChild ("World Model Glock-18").gameObject.SetActive (false);
            transform.FindChild ("World Model AK-47").gameObject.SetActive (true);
        } else if (weaponIn == 2)
            weaponOut == 2;
        transform.FindChild ("World Model Glock-18").gameObject.SetActive (true);
        transform.FindChild ("World Model AK-47").gameObject.SetActive (false);

}

i found one of the problems, you were closing your class on the line 39, so every line from 40 was wrong in the syntax.

this is a fairly easy mistake to catch, seems like you are really new to code.

if i may, i suggest you to practice the basics a little more, before trying something more complex, here some links

I tried to debug your code, even not knowing the context so, it maybe still wrong. here you go:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class weaponSwitch : MonoBehaviour {
 
    public GameObject Glock18;
    public GameObject AK47;
    public GameObject M4Carbine;
    public GameObject L96;
    public GameObject Shotgun;
    // Use this for initialization
    void Start () {
    }
    // Update is called once per frame
    void Update () {

        if (Input.GetKeyDown (KeyCode.E)) {
            RaycastHit hit;

            if (Physics.Raycast (Camera.main.transform.forward, transform.forward, out hit)){

                if (hit.transform.tag == "item"){

                    if(hit.transform.gameObject.name.Contains("World Model Glock-18")){

                        if(weaponOut==1){

                            changeWeapon(1);

                            if (weaponOut == 1) {
                                Destroy (hit.transform.gameObject);
                                Instantiate (Glock18, transform.root.transform.position + new Vector3 (0, 2, 0), Quaternion.identity);
                            }else if(weaponOut==2){
                                    Destroy(hit.transform.gameObject);
                                    Instantiate(AK47, transform.root.transform.position+new Vector3(0, 2, 0), Quaternion.identity);
                            }
                        }
                    }
                }
            }
        }
    }

    void changeWeapon(int weapon){

        if (weaponIn == 1) {
            weaponOut == 1;
            transform.FindChild ("World Model Glock-18").gameObject.SetActive (false);
            transform.FindChild ("World Model AK-47").gameObject.SetActive (true);
        } else if (weaponIn == 2){
            weaponOut == 2;
      
        transform.FindChild ("World Model Glock-18").gameObject.SetActive (true);
        transform.FindChild ("World Model AK-47").gameObject.SetActive (false);

        }
    }

}

Good luck!