Objects stay objects An object literal becomes
$.obj([...]) with the same slots; a method becomes a JavaScript function; a message becomes $.send(receiver, "selector", [arguments]), looked up through parent slots at run time just like Self.Blocks are closures Locals and arguments become JavaScript variables, blocks become arrow functions, and
^ inside a block returns from its method. Integers are BigInts, so 100 factorial is exact.The whole world comes along The starting world (numbers, strings, collections, morphs…) is itself written in Self and translated the same way. A web app's morphs are drawn with the browser's own buttons, fields and canvases.
Also on the desktop In Self World:
'3 + 4' asJavaScript, '…' asWebAppTitled: 'My app', World ▸ Export a Self file as a web app…, or self-world --web-app app.self.