Monday, May 20, 2024
143
rated 0 times [  144] [ 1]  / answers: 1 / hits: 178134  / 12 Years ago, fri, march 16, 2012, 12:00:00

Is there a way, like an extension or application, in Chrome to create and run .js files in Chrome?


More From » google-chrome

 Answers
8

if you don't want to explicitly create a js file but still want to test your javascript code, you can use snippets to run your JS code.


Follow the steps here:



  1. Open Dev Tools

  2. Go to Sources Tab

  3. Under Sources tab go to snippets, + New snippet

  4. Paste your JS code in the editor then run Command + Enter on a Mac, or Ctrl + Enter on Windows or Linux. You should see the output in console if you are using console.log or similar to test. You can edit the current web page that you have open or run scripts, load more javascript files. (Just note: this snippets are not stored on as a js file, unless you explicitly did, on your computer so if you remove chrome you will lose all your snippets);

  5. You also have a option to save as your snippet if you right click on your snippet.


code


[#86808] Thursday, March 15, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
brittanye

Total Points: 263
Total Questions: 94
Total Answers: 115

Location: Burkina Faso
Member since Thu, Dec 23, 2021
2 Years ago
;