The Object freeze() static method prevents the object from being modified.

    
    const company = {
        name: "Microsoft",
        industry: "tech",
        ceo: "Satya Nadella",
        revenue: 194
    };

    Object.freeze(company);

    // fails silently or throws error in strict mode
    company.year_founded = "1975";

    console.log(company.year_founded);
    // undefined