Skip to content

Instantly share code, notes, and snippets.

@marcuswestin
Created October 9, 2010 19:47
Show Gist options
  • Save marcuswestin/618533 to your computer and use it in GitHub Desktop.
Save marcuswestin/618533 to your computer and use it in GitHub Desktop.
let addItem = handler() { Global.items.push(Local.text) }
let containerStyle = { padding: 5, margin: 5, border: '1px solid' }
<div style=containerStyle>
<input data=Global.foo />
<br /> "Global.foo: " Global.foo
</div>
<div style=containerStyle>
"Add item with text: " <input data=Local.text />
<br /> <button onClick=addItem>"Add item: " Local.text</button>
</div>
<div style=containerStyle>
"Global.items:"
<ol>
for (item in Global.items) {
<li> "item: " item </li>
}
</ol>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment