Why I am not able to set to document or window object in js?

66 Views Asked by At

When I inspected and in console I wrote window.document = null; or window = null;. This do not assign null for respective props, why such behaviour?

If so, then can I explicitly disable any object or it's property from setting and only enable it to get data (just like what we have in C# - properties with only getter)

0

There are 0 best solutions below