Scripting for stop rendering fog

To script for not rendering fog I tried RenderSettings.fog.enabled because I seemed right but when I set it to true or false, it tells me that enabled isn't a member of boolean. How would you turn off fog in Javascript, and why is this error occuring?

That's incorrect syntax. Just look up RenderSettings.fog in the docs.