Difference between revisions of "Sandbox"

From Organic Design wiki
m
(Replaced content with "{{#tree: *foo **bar *baz }}")
Line 1: Line 1:
<html><script lang="javascript">
+
{{#tree:
 
+
*foo
$(document).ready( function() {
+
**bar
 
+
*baz
var closure = ( function() {
+
}}
    var private;
 
    return {
 
        foo: function() {
 
            private = 'secret message';
 
            this.public = 'not secret';
 
        },
 
        bar: function() {
 
            alert( private );
 
        }
 
    }
 
} )();
 
closure.foo();
 
closure.bar();
 
});
 
 
 
</script></html>
 

Revision as of 19:19, 26 September 2012