How to show sandbox for the JS code

I was wondering how I would show snipped of JS code on my website. This sandbox should also include the line number. I was going through the JS tutorial web site and saw an example there that looks like this…


This looks to have the information you need.

Note: There are plug-ins for prism and highlightjs for things like line numbers e.g.

1 Like