I worked with javascript files within Xcode3 before and everything is great, you just need to copy .js into remove the JavaScript file from the Compile Sources build phase a
Have a check here