← All snippets

Times table

Shared 28 October 2026. Link: /share/1

The code
set rows to 1, 2, 3, 4, 5
show "<table>"
for each row in rows
  show "<tr>"
  for each col in rows
    show "<td>[row * col]</td>"
  end
  show "</tr>"
end
show "</table>"
What it shows
Save, then link to the new row
set added to ask database "insert into snippets (title, code, shared) values (?, ?, ?) returning id" with snippet_title, snippet_code, now
go to "/share/[id of first of added]"

set slug to last of split path by "/"
set snippet to ask database "select title, code from snippets where cast(id as text) = ?" with slug
show code code of first of snippet
set result to try code of first of snippet

Shared code runs inside try: no files, no database, no cookies, no email, and loops stop after 20,000 steps. Its output is shown in a sandboxed frame, so even HTML it makes stays inside.