<jupyter_start><jupyter_text>How to deliver JavaScript to the IPython Notebook ViewerAt first glance there appear to be at least four mechanismsfor adding JavaScript code to an IPython notebook:    * A notebook cell marked `%%javascript`* A Markdown cell with a `` inside* An `HTML()` display with a `` inside* A `JavaScript()` display with code insideHere are examples of all four possibilities:<jupyter_code>%%javascript

console.log('Log message from the %%javascript cell')<jupyter_output><empty_output><jupyter_text>*(Markdown cell with a `` inside.)*console.log('Log message from the Markdown cell')<jupyter_code>from IPython.display import HTML
HTML('<script>console.log("Log message from an HTML display")</script>')
from IPython.display import Javascript
Javascript('console.log("Log message from a Javascript display")')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.0, 'mean_word_length': 7.2, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '667729', 'license': 'MIT', 'n_tokens_mistral': 244, 'n_tokens_neox': 234, 'n_words': 89, 'path': 'Javascript-integration.ipynb', 'repo_name': 'Grant-Steinfeld/astronomy-notebooks', 'size': '860'}