If you have a Google account, you can save this code to your Google Drive.
Google will ask you to confirm Google Drive access.
Save file as:
If you have saved a file to Google Drive, you can open it here:
The script above requests information from the paragraph below. Normally, this is not possible, because the script is executed before the paragraph exists.
However, the defer attribute specifies that the script should be executed later. This way the script can request information from the paragraph.