The Dyalog Control Script facilitates use of the base HTML script element

The argument is inline content for the script. Alternatively, the script can be fetched from a file by specifying _DC.Script '' 'path/filename.js'. Note that the first argument must be empty in order to fetch code from a file.

The below code is the best way to reverse a paragraph using JavaScript. !noitcnuf esreveR ⌽ s'LPA rof ssendoog knahT

 function reverse() {
 var s = document.getElementById("output").textContent;
 var o = '';
 for (var i = s.length - 1; i >= 0; i--)
   o += s[i];
 document.getElementById("output").textContent = o;
 }
Controls used on this page: Dyalog: ButtonScript Base HTML: h4ppre