Yes. And if you turn on "I am an advanced user" mode, you can selectively enable JS just for sites that need it that you want to allow to run arbitrary code on your machine, while still initially blocking everything from every new random site you encounter.
And for many sites, their main content is in their html and the ads are delivered via JS, so blocking the JS blocks all the ads.