You can disable all server-side execution of JavaScript, by passing the :option:`--noscripting <mongod --noscripting>` option on the command line or setting :setting:`security.javascriptEnabled` in a configuration file.
You can disable all server-side execution of JavaScript, by passing the :option:`--noscripting <mongod --noscripting>` option on the command line or setting :setting:`security.javascriptEnabled` in a configuration file.