var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 prism min js document head appendChild script document body style height 50pt manually add some style colors to identified tokens words var style document createElement style style type text css style innerHTML token color purple background color e5e5e5 keyword color red document head appendChild style onload function window Prism window Prism window Prism manual true const code for let i 0 i 10 i var data 1 let highlighted Prism highlight code Prism languages javascript javascript console log highlighted or output it to a html element on screen let div document createElement pre div className language js div innerHTML highlighted document body appendChild div var style document createElement link style rel stylesheet style type text css style href https cdnjs cloudflare com ajax libs prism 1 23 0 themes prism min css document head appendChild style var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 prism min js document head appendChild script document body style height 50pt onload function window Prism window Prism window Prism manual true const code for let i 0 i 10 i var data 1 let highlighted Prism highlight code Prism languages javascript javascript console log highlighted or output it to a html element on screen let div document createElement pre div className language js div innerHTML highlighted document body appendChild div var style document createElement link style rel stylesheet style type text css style href https cdnjs cloudflare com ajax libs prism 1 23 0 themes prism min css document head appendChild style var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 components prism core min js document head appendChild script var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 plugins autoloader prism autoloader min js document head appendChild script document body style height 80pt only code tag or output it to a html element on screen let code document createElement code code className language js code innerHTML let k 8 document body appendChild code code tag wrapped in a pre or output it to a html element on screen let pre document createElement pre document body appendChild pre let code document createElement code code className language js code innerHTML let i 2 pre appendChild code
ism window Prism manual true const code for let i 0 i 10 i var data 1 let highlighted Prism highlight code Prism languages javascript javascript console log highlighted or output it to a html element on screen let div document createElement pre div className language js div innerHTML highlighted document body appendChild div var style document createElement link style rel stylesheet style type text css style href https cdnjs cloudflare com ajax libs prism 1 23 0 themes prism min css document head appendChild style var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 components prism core min js document head appendChild script var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs prism 1 23 0 plugins autoloader prism autoloader min js document head appendChild script document body style height 80pt only code tag or output it to a html element on screen let code document createElement code code className language js code innerHTML let k 8 document body appendChild code code tag wrapped in a pre or output it to a html element on screen let pre document createElement pre document body appendChild pre let code document createElement code code className language js code innerHTML let i 2 pre appendChild code