Where is best practice to put index.js file within editor?

I’m about to add a bit of JS to a portfolio website i’m making for some button interaction and realised I’ve never added a JS file previously to VS code.

I know best practice is to have index.html on its own, then have .index.css within resources>css>index.css.

Where is best practice to keep my javascript document? I’m guessing I should be naming it index.js?


resources/js/index.js would be a very good choice indeed.

1 Like