
A tiny and easy-to-use syntax highlighter created only for JavaScript code.
How to use it:
1. Download the package and import the index.js into the HTML.
<script src="script.js"></script>
2. Wrap JavaScript snippets into code tag and done.
<code>
// CSSScript.com
function highlightAll(){
var allCodes = document.getElementsByTagName("code");
for (var i = 0; i < allCodes.length; i++) {
allCodes[i].className = "code";
allCodes[i].innerHTML = highlight(allCodes[i].innerHTML);
}
</code>






