Gmail will start blocking JavaScript attachments in February
Source: https://www.engadget.com/2017/01/26/gmail-block-javascript-attachments/
If you want to email a .js file to somebody for any reason, you only have a few more days to do so through Gmail. The service will start blocking JavaScript file attachments starting on February 13th, adding it to its list of restricted file types, which includes .exe, .msc and .bat. If you try to attach a .js file on or after the 13th, you'll get a notification that says it's blocked "because its content presents a potential security issue."
JavaScript files aren't inherently bad, but people could attach them to emails so that when you click on one, it acts as a downloader for a ransomware or other types of malware. Gmail can detect .js files even if they're sent as a .zip, a .tgz, a .gz or a .bz2. In case you really have to send one to a friend or a co-worker, the big G recommends uploading it to Google Drive instead.
Source: G Suite updates