A FEW SIMPLE STEPS
Get started
- Open the notebook and create a JavaScript note using the language chooser.
- Paste your .js source or import a JavaScript file.
- Use the code tools to format it, search within it, or save a useful selection as a snippet.
- Download the note or copy the edited source back to your project for testing.
Open editor takes you to the draft on this page. Paste or open a source file, or choose Try this example. Save to notebook keeps a named copy with your notes. Your workspace style stays unchanged.
Give a useful fragment a home
Name a note after the problem it solves and tag it for the project that needs it. The snippet library can insert saved code into the focused editor; you can also save a selected fragment as a custom snippet.
Use Format to tidy supported JavaScript syntax and find and replace to update repeated identifiers. Comparison panes help you inspect an old helper beside a revised version.
Editing and execution are separate steps
JavaScript mode edits source without running the .js note. For a small browser example, put your script inside an HTML note and use its sandboxed preview. The notebook does not provide Node.js, install npm packages, or build a project.
If your example is mostly an API payload, choose JSON mode to open its table visualizer. Choose TypeScript when you need type annotations in the source.
A few questions
Can I run JavaScript here?
A .js note edits source without executing it. Scripts inside an HTML note can run in its sandboxed preview. Node.js and package installation are not available.