AjTalkJs

Back to home

View on GitHub


Examples

Global napply: 'alert' with: { 'Hello world' }
Object compileMethod: 'zero ^0'. Object new zero
Object subclass: 'Point' instanceVariableNames: 'x y' classVariableNames: ''. Point compileMethod: 'x ^x.'. Point compileMethod: 'x: aValue x := aValue'. Point compileMethod: 'y ^y.'. Point compileMethod: 'y: aValue y := aValue'. p := Point new. p x: 10. p x
document := (Global nat: 'document'). body := document nat: 'body'. newDiv := document napply: 'createElement' with: { 'div' }. newContent := document napply: 'createTextNode' with: { 'Hello, world' }. newDiv napply: 'appendChild' with: { newContent }. body napply: 'appendChild' with: { newDiv }.