Users who want to attach .JS files to emails in Gmail will no longer be able to do it. Even if a user compresses the file into an archive like .zip or .gz, the user won’t be able to attach it to emails in Gmail.
The .JS file extension will be added soon to an existing list of banned file attachments that includes: .ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JSE, .LIB, .LNK, .MDE, .MSC, .MSP, .MST, .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF and .WSH.
Most of the mentioned file types have been abused by criminals for a long time, which is why they are on the list of banned file attachments.
As you already know, the number one rule is that if you don’t recognize a file type and you are not sure what it does, you should not open it. If you are expecting files in formats to which you aren’t accustomed to, you should always check with the sender whether you have received what you are supposed to receive, but it would be better not to share such files via email.