How To Disable JavaScript For Automation Testing with Selenium

Can someone please provide me the code that helps to disable JavaScript on Chrome and Firefox browsers?