Google has announced to block .js (javascript) file attachments in its email service, Gmail. This will apply from February 13, 2017. This big step is taken for security reasons. So, from next month onwards if your want to send a .js file then you can use Google Drive or Google Cloud storage.
Recently, Gmail restricted file attachments like .exe, .msc, and .bat. Same as other restricted file attachments, one will not be able to attach a .js file in future. An in-product warning will appear if one will do so which explains the reason why.
I think this is a really good step for security reasons. Now, hackers will not able to attach the .js file in emails. They use it as a downloader for a ransomware or other types of malware.