AI Assist Example—Writing Scripts and Code

ChatGPT can write code, so you might want to use it to produce, say, JavaScript. The simpler the request, the more likely it is to work.

Example In a topic, you want to add a countdown clock. In this example, you decide to insert the JavaScript directly into the topic, as opposed to placing it in a separate .js file and referring to it.

So you open AI Assist and write the following prompt:

Here is the response from ChatGPT:

You copy the parts of the HTML that you want to use, as well as the JavaScript code, and close AI Assist. Then, you switch to the Code Editor and paste it:

After committing the changes, you generate HTML5 output for the project. The updated topic looks like this:

Animated gif illustrating a countdown in the output created from AI.