Google has announced that it will start blocking .js attachments in Gmail from 13 February, 2017. Currently, Gmail restricts various file formats like .bat, .exe and .hta citing security reasons as these executable files are prone to exploits.
After the block has been implemented in a rollout expected to take a few days, any user attempting to upload a .js file will find themselves staring at a message stating the file was blocked due to a security issue. However, users can send these files over Google Cloud Storage or Google Drive without restrictions.
Additional measures currently taken by Google prevent password protected archives and locked files from being uploaded since they cannot be scanned before the user is able to download them.