Is there a way, like an extension or application, in Chrome to create and run .js files in Chrome?
if you don't want to create an explicitly a js file but still want to test your javascript code, you can use snippets to run your JS code.
Follow the steps here: