I must be using wrong search terms or something but everything I've tried so far did not work.
The last thing I tried was
<Files "filename.js">
SetHandler application/x-httpd-php
</Files>
It still returns code as plain text. What is the correct rule to use? I've verified it matches the right file by adding an extra header and this was returned correctly. I'm using Apache 2.2.24 and PHP 5.3.25.