The .js files can no longer be attached to Gmail mails for security issues.
Indeed, most of these files have one common feature: they are executable. Therefore, computer hackers can use them with phishing techniques to make them run by their targets and infect their computers. The .js files, especially used to develop web applications, are quite daunting for Windows computers because they automatically run the Windows Scripting Host (WSH), a software that can run scripts directly on the operating system Windows.
For those who need to send .js files for various reasons, Google recommends using its other platforms, including Google Drive and Google Cloud Storage.