DEV Community

Cover image for Run JS directly from the browser
shivamkapasia0
shivamkapasia0

Posted on

1

Run JS directly from the browser

Hey folks!

Sometimes when working on large project we need to check if this piece of code will work what it says or not and we can't debug in our project as it will take time to debug, In this case some dev use online js compiler or other editors/IDE but you can run javascript directly from your browser and also save code for your future use.

Step 1 : Right click in browser and click on inspect.
Step 2 : Click the Sources tab to open the Sources panel. The Page pane usually opens by default.
Image description
Step 3 : Click the Snippets tab to open the Snippets pane. You might need to click More Tabs >> in order to access the Snippets option.
Image description

Open the Snippets pane

The Snippets pane lists your Snippets. When you want to edit a Snippet, you need to open it from the Snippets pane.
Image description
press Control+Enter or Command+Enter (Mac).

Rename Snippets

  1. Open the Snippets pane.
  2. Right-click the Snippet name and select Rename.

Delete Snippets

  1. Open the Snippets pane.
  2. Right-click the Snippet name and select Remove.

More details on snippets here.


What's your thought on this ?

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay