All you need to do is add an HTML block, add <script> and </script> tags, then put what you want between them.
For that reason, you may want the page’s elements with which the script will interact fully developed first, so the best place for the block would be at the bottom of the page.
Here’s an example from the Understanding Colors post:
Here it is in operation:
See also: How To Build A Converter