The company explains that, if you need to send a.js file for legitimate reasons, you can use Google Drive, Google Could Storage, or any other cloud storage platform to do so.
Once you try to attach a.js file to a Gmail message, the email platform will immediately show a message in bold red letters on the lower tab saying the attachment was "blocked for security reasons!"
Other scripting files like.VBS (VBScript),.VBE (VBScript Encoded),.WSH (Windows Script Host Settings File) and.WSF (Windows Script File) - all of which Gmail already blocks - can be used in a similar way. Other file extensions that are prohibited include.exe, .jse, .ade and.adp. As this attachment is commonly used to distribute malware, the blocking of JS files will only increase the security of user's Gmail account.