"Similar to other restricted file attachments, you will not be able to attach a .js file and an in-product warning will appear, explaining the reason why," the search giant said.
However, in case you have legitimate reasons for sending such a file, Google suggests you use Google Drive, Google Cloud Storage, or other storage solutions to share the file.
zip not included :)
and this is why these files are restricted...
I can't comment on that as I haven't tested that. Sharing it via Drive is way simpler for me because not all my contacts are so familiar with Application softwares. Will try this next time I am in need to send such a file.